題目連結: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1269 Toss is an important part of any event. When everything becomes equal toss is the ultimate decider. Normally a fair coin
題目連結: http://codeforces.com/problemset/problem/401/D D. Roman and Numbers time limit per test 4 seconds memory limit per test 512 megabytes input standard input
B. Balanced Substring time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a string s consisting only of characters 0 and 1. A substring [l, r] of s is a string slsl + 1sl + 2…
There are n Doge Planets in the Doge Space. The conqueror of Doge Space is Super Doge, who is going to inspect his Doge Army on all Doge Planets. The inspection starts from Doge Planet 1 where DOS (Doge Olympic Statue) was built. It takes Super Doge
尼姆博弈: 描述:有n堆石子,每堆若干個,兩個人輪流從某一堆取任意多石子,規定每次至少取1個,多者不限,最後取光者得勝 結論:對n個石子數進行異或運算,結果為0則為P點,先手必敗,否則為N點 題目:POJ 2234 #include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 110;int main(){ int n; while(~ scanf("%d&
Innokentiy likes tea very much and today he wants to drink exactly n cups of tea. He would be happy to drink more but he had exactly n tea bags, a of them are green and b are black. Innokentiy doesn't like