結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
rnrnr0724
|
| 提出日時 | 2023-12-06 22:48:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 377 bytes |
| コンパイル時間 | 363 ms |
| コンパイル使用メモリ | 31,872 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-27 01:49:59 |
| 合計ジャッジ時間 | 1,479 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 8 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
int main(void){
int N, i, tmp, x = 0, y = 0, *a;
scanf("%d", &N);
a = (int*)malloc(N*sizeof(int));
for(i=0; i<N; i++) scanf("%d", a+i);
for(i=0; i<N; i++){
scanf("%d", &tmp);
if(tmp) y += *(a+i);
else x += *(a+i);
}
printf("%s\n", x >= y ? "YES" : "NO");
free(a);
return 0;
}
rnrnr0724