結果
問題 |
No.946 箱箱箱
|
ユーザー |
![]() |
提出日時 | 2019-12-09 00:27:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 730 bytes |
コンパイル時間 | 1,631 ms |
コンパイル使用メモリ | 160,764 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-01-02 22:08:30 |
合計ジャッジ時間 | 3,369 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 46 WA * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:17:17: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 17 | int n; scanf("%d",&n); | ~~~~~^~~~~~~~~ main.cpp:19:20: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 19 | rep(i,0,n)scanf("%d",&a[i]); | ~~~~~^~~~~~~~~~~~
ソースコード
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; //template #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(a);i>(b);i--) #define ALL(v) (v).begin(),(v).end() typedef long long int ll; const int inf = 0x3fffffff; const ll INF = 0x3fffffffffffffff; template<class T> inline bool chmax(T& a,T b){ if(a<b){a=b;return 1;}return 0; } template<class T> inline bool chmin(T& a,T b){ if(a>b){a=b;return 1;}return 0; } //template end int main(){ int n; scanf("%d",&n); vector<int> a(n); rep(i,0,n)scanf("%d",&a[i]); int cnt=0,idx=0,g=0; while(idx<n){ g^=a[idx]; if(g==0)cnt++; idx++; } printf(cnt>=1?"Takahashi":"Takanashi"); return 0; }