結果
問題 |
No.524 コインゲーム
|
ユーザー |
![]() |
提出日時 | 2017-06-02 23:15:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 1,018 ms |
コンパイル使用メモリ | 71,712 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 03:20:22 |
合計ジャッジ時間 | 7,726 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 TLE * 2 |
ソースコード
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <iostream> #include <vector> #include <string> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> using namespace std; int main() { unsigned n; cin >> n; unsigned ans = 0; if (n == (1LL << 32) - 1) { cout << "X" << endl; return 0; } for (int i = 1; i <= n; i++ ) { ans ^= i; } cout << (ans == 0 ? "X" : "O") << endl; }