提出 #66164806
ソースコード 拡げる
#include <cstdio>
using namespace std;
bool check2(int x,int y,int z) {
if(!z) return y%2==0&&y<=x*2;
return z<=x&&y<=x*2;
}
int main() {
int T;
scanf("%d",&T);
while(T--) {
int x,y,z;
scanf("%d%d%d",&x,&y,&z);
printf(check2(x,y,z)?"Yes\n":"No\n");
}
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Rivalry |
| ユーザ | lnw143 |
| 言語 | C++ 17 (gcc 12.2) |
| 得点 | 500 |
| コード長 | 290 Byte |
| 結果 | AC |
| 実行時間 | 64 ms |
| メモリ | 1708 KiB |
コンパイルエラー
Main.cpp: In function ‘int main()’:
Main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d",&T);
| ~~~~~^~~~~~~~~
Main.cpp:12:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | scanf("%d%d%d",&x,&y,&z);
| ~~~~~^~~~~~~~~~~~~~~~~~~
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 500 / 500 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example_00.txt |
| All | example_00.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| example_00.txt | AC | 0 ms | 1692 KiB |
| test_00.txt | AC | 28 ms | 1620 KiB |
| test_01.txt | AC | 43 ms | 1616 KiB |
| test_02.txt | AC | 64 ms | 1588 KiB |
| test_03.txt | AC | 64 ms | 1504 KiB |
| test_04.txt | AC | 64 ms | 1652 KiB |
| test_05.txt | AC | 64 ms | 1708 KiB |
| test_06.txt | AC | 63 ms | 1592 KiB |
| test_07.txt | AC | 58 ms | 1664 KiB |
| test_08.txt | AC | 59 ms | 1612 KiB |
| test_09.txt | AC | 58 ms | 1700 KiB |