結果
問題 | No.524 コインゲーム |
ユーザー |
![]() |
提出日時 | 2020-04-09 15:27:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 675 bytes |
コンパイル時間 | 1,573 ms |
コンパイル使用メモリ | 166,760 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 11:14:52 |
合計ジャッジ時間 | 2,707 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++) #define all(x) (x).begin(), (x).end() #define sz(x) ((int)x.size()) template <class T> bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } template <class T> using V = vector<T>; using P = pair<int, int>; /* */ signed main() { int n; cin >> n; int x = 0; rep(i, n/4*4, n+1){ x ^= i; } /* * 100 * 101 * 110 * 111 * 000 */ cout << (x ? "O" : "X") << endl; return 0; }