結果
| 問題 |
No.239 にゃんぱすー
|
| ユーザー |
fumi6328
|
| 提出日時 | 2018-08-29 22:47:09 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 569 bytes |
| コンパイル時間 | 391 ms |
| コンパイル使用メモリ | 55,640 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 19:31:16 |
| 合計ジャッジ時間 | 2,373 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
int num[100] = {};
string a;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> a;
if(a == "nyanpass") num[j]++;
}
}
int ans,count = 0;
for(int i = 0; i < n; i++){
if(num[i] == n - 1){
count++;
ans = i + 1;
}
}
if(count == 1)
cout << ans << endl;
else
cout << -1 << endl;
return 0;
}
fumi6328