結果
| 問題 |
No.946 箱箱箱
|
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2019-12-09 01:03:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 986 bytes |
| コンパイル時間 | 1,163 ms |
| コンパイル使用メモリ | 106,188 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-03 00:01:39 |
| 合計ジャッジ時間 | 2,763 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 42 WA * 9 |
ソースコード
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
int main()
{
int n; cin>>n;
int a[2020];
for(int i=0; i<n; i++){
cin>>a[i];
}
int s=0;
for(int i=0; i<n; i++){
s^=a[i];
if(s==0){
cout<<"Takahashi"<<endl;
return 0;
}
}
s=0;
for(int i=n-1; i>=0; i--){
s^=a[i];
if(s==0){
cout<<"Takahashi"<<endl;
return 0;
}
}
cout<<"Takanashi"<<endl;
return 0;
}
chocorusk