結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-07-22 15:38:59 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 329 bytes |
| コンパイル時間 | 1,786 ms |
| コンパイル使用メモリ | 157,396 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 06:40:05 |
| 合計ジャッジ時間 | 3,218 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 WA * 22 |
コンパイルメッセージ
main.cpp:2:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
2 | main(){
| ^~~~
main.cpp: In function ‘int main()’:
main.cpp:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d%d%d",&X,&Y,&N);
| ~~~~~^~~~~~~~~~~~~~~~~~~
main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d",&T[i]);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h>
main(){
int X,Y,N,T[80];
scanf("%d%d%d",&X,&Y,&N);
for(int i = 0;i < N;i++){
scanf("%d",&T[i]);
}
for(int i = 0;i < N-1;i++){
double time = 1.*T[i]/X;
if(Y*time >= T[i+1]){
printf("NO\n");
return 0;
}
}
printf("YES\n");
}
Bantako