結果
| 問題 | No.3453 Crape Shop |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-27 17:45:17 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 457 bytes |
| 記録 | |
| コンパイル時間 | 2,596 ms |
| コンパイル使用メモリ | 328,232 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-27 17:45:22 |
| 合計ジャッジ時間 | 3,746 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int customer;
int apple;
int banana;
int end;
cin >> customer >> apple >> banana;
for (end = 0; apple == 0 || banana == 0; end++){
int crape;
cin >> crape;
switch (crape){
case 1:
apple--;
break;
case 2:
banana--;
break;
case 3:
apple--;
banana--;
break;
}
}
return (end == customer) ? -1 : end;
}