結果
問題 | No.706 多眼生物の調査 |
ユーザー | kotatsugame |
提出日時 | 2018-06-29 22:23:10 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 16 ms / 2,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 1,212 ms |
コンパイル使用メモリ | 74,780 KB |
実行使用メモリ | 4,628 KB |
最終ジャッジ日時 | 2023-09-13 15:19:46 |
合計ジャッジ時間 | 1,302 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 7 ms
4,388 KB |
testcase_01 | AC | 7 ms
4,380 KB |
testcase_02 | AC | 6 ms
4,508 KB |
testcase_03 | AC | 6 ms
4,380 KB |
testcase_04 | AC | 7 ms
4,376 KB |
testcase_05 | AC | 10 ms
4,376 KB |
testcase_06 | AC | 16 ms
4,628 KB |
testcase_07 | AC | 7 ms
4,380 KB |
コンパイルメッセージ
main.cpp:7:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type] 7 | main() | ^~~~
ソースコード
#include<iostream> #include<algorithm> #include<vector> using namespace std; pair<int,int>cnt[1<<17]; string s;int n; main() { cin>>n; for(int i=0;i<n;i++) { cin>>s; cnt[s.size()-2]=make_pair(cnt[s.size()-2].first+1,s.size()-2); } sort(cnt,cnt+(1<<17)); cout<<cnt[(1<<17)-1].second<<endl; }