Educational Codeforces Round 157 (Rated for Div. 2)
# Educational Codeforces Round 157 (Rated for Div. 2) # A Treasure Chest 连签到题都不怎么算 如果箱子是在钥匙的右边,那么答案就是钥匙的位置,走的过程中就得到了要是,没有任何力气的花费。 如果箱子是在钥匙的左边,那么答案就是先搬箱子,直到力气耗尽,然后继续走到钥匙,然后再走回来。 直接看代码吧 Code using namespace std;int main(){ int t; cin>>t; while(t--){ int a,b,c;...
more...