https://github.com/Jimmy-Hu/janeliao_thesis/compare/main...janeliao0105:main
Please notice that making sure the given git commit messages match the exact changes you modified.
In the commit
96f56405ddd8f466713339858d1f43670b251814
, your commit message isUpdate gym_future
. However, the things you actually done is adding files todists
folder.
https://www.hackerrank.com/challenges/30-dictionaries-and-maps/problem
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <map>
using namespace std;
int main() {
string name;
string number;
map<string, string> phonebook;
int n;
cin >> n;
while (n>0){
cin >> name;
cin >> number;
phonebook.insert(pair<string,string>(name, number));
n--;
}
while ( cin>> name){
if (phonebook.find(name) != phonebook.end()) {
cout << name << "=" << phonebook.find(name)->second << endl;
}
else {
cout <<"Not found"<< endl;
}
}
return 0;
}
https://leetcode.com/problems/two-sum/submissions/
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target, int start = 0) {
vector<vector<int>> res;
unordered_set<int> s;
for (int i = start; i < nums.size(); ++i) {
if (res.empty() || res.back()[1] != nums[i]) {
if (s.count(target - nums[i])) {
auto value = target - nums[i];
res.push_back({ static_cast<int>(find(nums.begin(), nums.end(), value) - nums.begin()), i });
}
}
s.insert(nums[i]);
}
return res.at(0);
}
};
https://leetcode.com/problems/4sum/
https://docs.google.com/document/d/1mcCitNotEGre0NUexFBndr2rLqz3cio3aFzNnHDGHeU/edit?hl=zh-TW
https://jamboard.google.com/d/1iZVxu3EwRyoz4VFFFO9EblC2rMTqJ60pJMcr5e9qHzk/viewer?hl=zh-TW&f=0
Tianshou (天授) is a reinforcement learning platform based on pure PyTorch
https://tianshou.readthedocs.io/en/master/index.html
https://tianshou.readthedocs.io/en/master/tutorials/benchmark.html