結果
問題 | No.706 多眼生物の調査 |
ユーザー |
![]() |
提出日時 | 2018-09-07 10:43:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 10 ms / 2,000 ms |
コード長 | 452 bytes |
コンパイル時間 | 1,227 ms |
コンパイル使用メモリ | 158,184 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 08:12:10 |
合計ジャッジ時間 | 1,826 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:23:11: warning: ‘ind’ may be used uninitialized in this function [-Wmaybe-uninitialized] 23 | cout << ind << endl; | ^~~
ソースコード
#include<bits/stdc++.h>#define MAX_N 100001#define INF_INT 2147483647#define INF_LL 9223372036854775807#define REP(i,n) for(int i=0;i<(int)(n);i++)using namespace std;typedef long long int ll;typedef pair<ll,ll> P;int main(){int N,me[1001] = {0},ma=-1,ind;string S;cin >> N;REP(i,N){cin >> S;me[S.size()-2]++;}REP(i,1001)if(ma <= me[i]){ma = me[i];ind = i;}cout << ind << endl;return 0;}