結果
| 問題 |
No.239 にゃんぱすー
|
| コンテスト | |
| ユーザー |
cww
|
| 提出日時 | 2016-05-18 15:01:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 555 bytes |
| コンパイル時間 | 1,536 ms |
| コンパイル使用メモリ | 173,728 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-06 05:30:28 |
| 合計ジャッジ時間 | 2,428 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 WA * 8 |
ソースコード
#include <bits/stdc++.h>
#define REP(i, n) for(int i=0; i<(n); i++)
#define REP2(i, x, n) for(int i=x; i<(n); i++)
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
string s;
set<int> st;
bool flag = false;
REP( i, n ){
REP( j, n ){
cin >> s;
if( s == "nyanpass" ){
st.insert( j );
flag = true;
}else{
if( flag ){
st.erase( j );
}
}
}
}
for( auto x : st ){
if( st.size() == 1 ){
cout << x + 1 << endl;
return 0;
}
}
cout << -1 << endl;
return 0;
}
cww