結果
| 問題 |
No.239 にゃんぱすー
|
| コンテスト | |
| ユーザー |
hamray
|
| 提出日時 | 2017-11-19 20:50:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 611 bytes |
| コンパイル時間 | 1,198 ms |
| コンパイル使用メモリ | 159,188 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-26 00:36:44 |
| 合計ジャッジ時間 | 2,170 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 26 WA * 7 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int N; cin >> N;
string nyan[N][N];
for(int i=0; i<N; i++){
for(int j=0; j<N; j++){
cin >> nyan[i][j];
}
}
int cnt = 0, judge = 0;
for(int i=0; i<N; i++){
for(int j=0; j<N; j++){
if(nyan[j][i] == "nyanpass"){
cnt++;
if(cnt == N-1){
judge++;
cout << i+1 << endl;
break;
}
}
}
}
if(judge != 1){
cout << -1 << endl;
}
return 0;
}
hamray