摘要:
A - Circle #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int r; int main(){ cin >> r; cout << r * r << end 阅读全文
摘要:
HDU 1538 A Puzzle for Pirates 这是一个经典问题,有n个海盗,分m块金子,其中他们会按一定的顺序提出自己的分配方案,如果50%或以上的人赞成,则方案通过,开始分金子,如果不通过,则把提出方案的扔到海里,下一个人继续。现在给出n,问第k个海盗(第n个海盗先提方案,第1个最后 阅读全文
摘要:
HDU 2486 A simple stone game 有n个石子,两个游戏者轮流操作,第一个操作的人最多能拿走n-1个石子,以后,每个游戏者最多能拿走前一个游戏者拿走数目的k倍,如果先手必败输出lose,否则输出必胜的情况下第一步拿走的石子数。 这就是K倍动态减法游戏,可以参考《曹钦翔从“k倍动 阅读全文
摘要:
A - Can't Wait for Holiday #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; string s; int main() { cin >> s; 阅读全文
摘要:
A - November 30 #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a, b, c, d; int main() { cin >> a >> b 阅读全文
摘要:
A - Entrance Examination #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; double a, b; int main(){ cin >> a > 阅读全文
摘要:
A - B +/- A #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a,b; int main(){ cin >> a >> b; if (b % a == 阅读全文
摘要:
A - Still TBD #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ string s; cin >> s; if (s[5] == '1 阅读全文
摘要:
A - Favorite Sound #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ int a, b, c; cin >> a >> b >> 阅读全文
摘要:
A - White Cells #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ int a,b,c,d; cin >> a >> b >> c 阅读全文
摘要:
A - Double Helix #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ char c; cin >> c; if (c == 'A') 阅读全文
摘要:
A - Five Antennas #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a[5]; int main() { for (int i = 0; i 阅读全文
摘要:
A - Buttons #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int a, b; int main(){ cin>>a>>b; cout << max({a 阅读全文