摘要:
这是一个dp题,可以用4维数据来表示所有的状态。 但是有一个需要注意的点,一般来说,对于每个坐标,有拿跟不拿两种情况,如果没有拿任务宝物的状态表示为0,那么拿取了价值为0的宝物时,要以另一种情况来跟没拿区分。 处理的方法就是将所有宝物的价格+1。 long long dp[55][55][15][1 阅读全文
摘要:
It's a simple problem on codeforces. we traverse the through the string n, if we encouter a '1', we add a new string to ans and set stop to false.Othe 阅读全文
摘要:
https://codeforces.com/problemset/problem/762/A This is a easy problem based on number theory. We just simply iterate i from 1 to the value of sqrt(n) 阅读全文
摘要:
https://codeforces.com/problemset/problem/277/A It presents a problem that we need to make all element connected, it can be solved by using dsu. I did 阅读全文
摘要:
https://codeforces.com/problemset/problem/1490/E This is a chanllenging problem on codeforces with a diffcuilty score of 1400. It can be solved by usi 阅读全文
摘要:
This a constructive problem on codeforces with a diffcuilty score of 1400. https://codeforces.com/problemset/problem/1463/B It's evident that we can a 阅读全文
摘要:
https://codeforces.com/problemset/problem/550/B Brute force problem void solve(){ int n, l, r, x; cin >> n >> l >> r >> x; vector<int> a(n); for(auto& 阅读全文
摘要:
https://codeforces.com/problemset/problem/1369/C This is a hard problem on codefores with a diffcuilty score of 1400 It can also be solved by using th 阅读全文
摘要:
This is a chanllenging problem on codeforces with a diffcuilt score of 1400. It presents a intressting chanllege that can be solved by using the princ 阅读全文