結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2015-05-28 23:20:02 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 623 bytes |
コンパイル時間 | 1,056 ms |
コンパイル使用メモリ | 157,912 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 10:10:20 |
合計ジャッジ時間 | 1,757 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 3 |
ソースコード
#include <bits/stdc++.h> inline long nextInt(void) { long temp; std::cin >> temp; return temp; } int main() { int point[128] = {}; int id[128] = {}; int total[128] = {}; int N; int max = -10000; std::cin >> N; for(int i = 0; i < N; ++i) { std::cin >> point[i]; } for(int i = 0; i < N; ++i) { std::cin >> id[i]; } for(int i = 0; i < N; ++i) { total[id[i]] += point[i]; } for(int i = 0; i < N; ++i) { max = std::max(max, total[i]); } if( max == total[0] ) { std::cout << "YES" << std::endl; } else { std::cout << "NO" << std::endl; } return 0; }