結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-07-22 15:37:47 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 328 bytes |
| コンパイル時間 | 1,472 ms |
| コンパイル使用メモリ | 158,208 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-27 06:39:40 |
| 合計ジャッジ時間 | 2,793 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 48 WA * 5 |
コンパイルメッセージ
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