結果
問題 | No.1376 Simple LPS Problem |
ユーザー | tails |
提出日時 | 2021-02-09 20:08:12 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 610 bytes |
コンパイル時間 | 943 ms |
コンパイル使用メモリ | 30,848 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 02:15:12 |
合計ジャッジ時間 | 2,916 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,812 KB |
testcase_01 | AC | 1 ms
6,940 KB |
testcase_02 | AC | 1 ms
6,940 KB |
testcase_03 | AC | 1 ms
6,940 KB |
testcase_04 | AC | 1 ms
6,940 KB |
testcase_05 | AC | 1 ms
6,944 KB |
testcase_06 | AC | 1 ms
6,944 KB |
testcase_07 | AC | 1 ms
6,944 KB |
testcase_08 | AC | 1 ms
6,944 KB |
testcase_09 | AC | 1 ms
6,944 KB |
testcase_10 | AC | 1 ms
6,940 KB |
testcase_11 | AC | 1 ms
6,944 KB |
testcase_12 | AC | 1 ms
6,940 KB |
testcase_13 | AC | 1 ms
6,944 KB |
testcase_14 | AC | 1 ms
6,940 KB |
testcase_15 | AC | 1 ms
6,944 KB |
testcase_16 | AC | 1 ms
6,944 KB |
testcase_17 | AC | 1 ms
6,944 KB |
testcase_18 | AC | 1 ms
6,944 KB |
testcase_19 | AC | 1 ms
6,940 KB |
testcase_20 | AC | 1 ms
6,944 KB |
testcase_21 | AC | 1 ms
6,940 KB |
testcase_22 | AC | 1 ms
6,940 KB |
testcase_23 | AC | 1 ms
6,944 KB |
testcase_24 | AC | 1 ms
6,944 KB |
testcase_25 | AC | 1 ms
6,940 KB |
testcase_26 | AC | 1 ms
6,944 KB |
testcase_27 | AC | 1 ms
6,940 KB |
testcase_28 | AC | 1 ms
6,944 KB |
testcase_29 | AC | 1 ms
6,940 KB |
testcase_30 | AC | 1 ms
6,940 KB |
testcase_31 | AC | 1 ms
6,944 KB |
testcase_32 | AC | 1 ms
6,940 KB |
testcase_33 | AC | 1 ms
6,940 KB |
testcase_34 | AC | 1 ms
6,940 KB |
testcase_35 | AC | 1 ms
6,940 KB |
testcase_36 | AC | 1 ms
6,944 KB |
testcase_37 | AC | 1 ms
6,940 KB |
testcase_38 | AC | 1 ms
6,944 KB |
testcase_39 | AC | 1 ms
6,940 KB |
testcase_40 | AC | 1 ms
6,944 KB |
testcase_41 | AC | 1 ms
6,944 KB |
testcase_42 | AC | 1 ms
6,940 KB |
testcase_43 | AC | 1 ms
6,940 KB |
testcase_44 | AC | 1 ms
6,944 KB |
testcase_45 | AC | 1 ms
6,940 KB |
testcase_46 | AC | 1 ms
6,940 KB |
testcase_47 | AC | 1 ms
6,944 KB |
testcase_48 | AC | 1 ms
6,940 KB |
testcase_49 | AC | 1 ms
6,940 KB |
testcase_50 | AC | 1 ms
6,940 KB |
testcase_51 | AC | 1 ms
6,940 KB |
testcase_52 | AC | 1 ms
6,944 KB |
testcase_53 | AC | 1 ms
6,940 KB |
testcase_54 | AC | 1 ms
6,940 KB |
testcase_55 | AC | 1 ms
6,940 KB |
testcase_56 | AC | 1 ms
6,940 KB |
testcase_57 | AC | 1 ms
6,940 KB |
testcase_58 | AC | 1 ms
6,944 KB |
testcase_59 | AC | 1 ms
6,944 KB |
testcase_60 | AC | 1 ms
6,940 KB |
testcase_61 | AC | 1 ms
6,944 KB |
コンパイルメッセージ
main.c:9:1: warning: return type defaults to 'int' [-Wimplicit-int] 9 | main(){ | ^~~~ main.c: In function 'main': main.c:15:25: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration] 15 | strcpy(wbuf,"-1"); | ^~~~~~ main.c:1:1: note: include '<string.h>' or provide a declaration of 'strcpy' +++ |+#include <string.h> 1 | #pragma GCC optimize("Ofast") main.c:15:25: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 15 | strcpy(wbuf,"-1"); | ^~~~~~ main.c:15:25: note: include '<string.h>' or provide a declaration of 'strcpy' main.c:18:25: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch] 18 | strcpy(wbuf,k==1?"01":k==2?"0011":"00010111"); | ^~~~~~ main.c:18:25: note: include '<string.h>' or provide a declaration of 'strcpy' main.c:21:17: warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration] 21 | memset(wbuf,'0',k); | ^~~~~~ main.c:21:17: note: include '<string.h>' or provide a declaration of 'memset' main.c:21:17: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch] main.c:21:17: note: include '<string.h>' or provide a declaration of 'memset' main.c:33:9: warning: implicit declaration of function 'write' [-Wimplicit-function-declaration] 33 | write(1,wbuf,n+1); | ^~~~~
ソースコード
#pragma GCC optimize("Ofast") #pragma GCC target("avx2") char*mmap(); #define RD(v) int v=0;{int _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;} char wbuf[1<<28]; main(){ char*rp=mmap(0l,1l<<28,1,2,0,0ll); RD(n); RD(k); if(k<4){ if(k==1&n>2|k==2&n>4|k==3&n>8){ strcpy(wbuf,"-1"); n=2; }else{ strcpy(wbuf,k==1?"01":k==2?"0011":"00010111"); } }else{ memset(wbuf,'0',k); long*wp=(long*)(wbuf+k); long v0=*(long*)"10110010"; long v1=*(long*)"11001011"; long v2=*(long*)"00101100"; for(int j=n-k;j>0;j-=24){ *wp++=v0; *wp++=v1; *wp++=v2; } } wbuf[n]=10; write(1,wbuf,n+1); }