結果

問題 No.2922 Rose Garden
ユーザー tails
提出日時 2024-10-13 01:13:00
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 3 ms / 3,000 ms
コード長 455 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 23,424 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-13 01:13:04
合計ジャッジ時間 1,818 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 50
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:17:33: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
   17 |                                 write(1,"No",2);
      |                                 ^~~~~
main.c:18:33: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration]
   18 |                                 _exit(0);
      |                                 ^~~~~
main.c:18:33: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
main.c:24:9: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
   24 |         _exit(0);
      |         ^~~~~

ソースコード

diff #
プレゼンテーションモードにする

#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#define rd_init() char*rp=({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);})
#define rd() ({int _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})
#define repeat(e) for(typeof(e)_=e;_--;)
int main(){
rd_init();
int n=rd();
long s=(long)rd()*rd();
long h=rd();
repeat(n-1){
long t=rd();
if(t>h){
if(t>h+s){
write(1,"No",2);
_exit(0);
}
h=t;
}
}
write(1,"Yes",3);
_exit(0);
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0