結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2020-01-18 15:26:21 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 421 bytes |
| 記録 | |
| コンパイル時間 | 3,514 ms |
| コンパイル使用メモリ | 203,096 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-01-29 18:44:18 |
| 合計ジャッジ時間 | 3,623 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
int n, s;
cin >> n;
int a[n], b[n], p[101];
fill(p, p+100, 0);
rep(i, n)
cin >> a[i];
rep(i, n)
cin >> b[i];
rep(i, n)
p[b[i]] += a[i];
s = 0;
rep(i,101)
s = max(p[i], s);
cout << ( (s == p[0]) ? "YES" : "NO" );
}
Konton7