結果
問題 | No.465 PPPPPPPPPPPPPPPPAPPPPPPPP |
ユーザー | tails |
提出日時 | 2016-12-15 22:53:42 |
言語 | C90 (gcc 11.4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 616 bytes |
コンパイル時間 | 529 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 10,596 KB |
最終ジャッジ日時 | 2024-05-07 15:11:54 |
合計ジャッジ時間 | 4,185 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
10,596 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 0 ms
5,376 KB |
testcase_04 | AC | 0 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 4 ms
5,376 KB |
testcase_07 | AC | 2 ms
5,376 KB |
testcase_08 | AC | 4 ms
5,376 KB |
testcase_09 | TLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
32_ratsliveonnoevilstar.txt | -- | - |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | a[500010];b[500010]; | ^ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:2:11: warning: data definition has no type or storage class 2 | a[500010];b[500010]; | ^ main.c:2:11: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] main.c:8:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 8 | main(i,j,k,l,m){ | ^~~~ main.c: In function ‘main’: main.c:8:1: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:8:1: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int] main.c:8:1: warning: type of ‘k’ defaults to ‘int’ [-Wimplicit-int] main.c:8:1: warning: type of ‘l’ defaults to ‘int’ [-Wimplicit-int] main.c:8:1: warning: type of ‘m’ defaults to ‘int’ [-Wimplicit-int] main.c:9:9: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 9 | gets(s); | ^~~~ main.c:10:11: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] 10 | l=strlen(s); | ^~~~~~ main.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’ +++ |+#include <string.h> 1 | char s[500010]; main.c:10:11: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch] 10 | l=strlen(s); | ^~~~~~ main.c:10:11: note: include ‘<string.h>’ or provide a declaration of ‘strlen’ main.c:50:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 50 | printf("%lld",r); | ^~~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ +++ |+#include <stdio.h> 1 | char s[500010]; main.c:50:9: warning: incompatible implicit declaration of built-in function ��
ソースコード
char s[500010]; a[500010];b[500010]; long long r; typedef long long H; H rm=1000000007; main(i,j,k,l,m){ gets(s); l=strlen(s); H r1=0; H r2=0; H r3=1; for(i=0;i<l;++i){ r1=r1*rm+s[i]; r2=r2+r3*s[i]; r3*=rm; if(r1==r2){ H r4=0; H r5=0; H r6=1; for(j=i+1;j<l;++j){ r4=r4*rm+s[j]; r5=r5+r6*s[j]; r6*=rm; if(r4==r5){ ++a[j]; } } } } { H r7=0; H r8=0; H r9=1; for(j=j-1;j>=0;--j){ r7=r7*rm+s[j]; r8=r8+r9*s[j]; r9*=rm; if(r7==r8){ ++b[j]; } } } m=0; for(i=0;i<l;++i){ m+=a[i]; r+=m*b[i+2]; } printf("%lld",r); return 0; }