結果
問題 |
No.239 にゃんぱすー
|
ユーザー |
![]() |
提出日時 | 2017-08-22 18:11:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 511 bytes |
コンパイル時間 | 1,593 ms |
コンパイル使用メモリ | 165,716 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 04:23:58 |
合計ジャッジ時間 | 3,424 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main(){ | ^~~~
ソースコード
#include<bits/stdc++.h> typedef long long ll; using namespace std; int INF = 1e9; int MOD = 1e9+7; int cnt[100]; main(){ int N; cin >> N; for(int i = 0;i < N;i++){ for(int j = 0;j < N;j++){ string s; cin >> s; if(s == "nyanpass")cnt[j]++; } } int no = -1; for(int i = 0;i < N;i++){ if(cnt[i] != N-1)continue; if(no != -1){ no = -1; break; }else no = i+1; } cout << no << endl; }