結果

問題 No.946 箱箱箱
ユーザー tko919tko919
提出日時 2019-12-09 00:17:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 663 bytes
コンパイル時間 1,447 ms
コンパイル使用メモリ 160,496 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2025-01-02 21:35:23
合計ジャッジ時間 2,914 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32 WA * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
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]);
      |               ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#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 g=0;
    rep(i,0,n)g^=a[i];
    printf(g?"Takanashi":"Takahashi");
    return 0;
}
0