結果
| 問題 |
No.381 名声値を稼ごう Extra
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2016-06-18 08:30:07 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 346 bytes |
| コンパイル時間 | 744 ms |
| コンパイル使用メモリ | 21,680 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-09 20:29:52 |
| 合計ジャッジ時間 | 1,493 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 2 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
2 | a[140000];
| ^
main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
main.c:3:1: warning: data definition has no type or storage class
3 | p[140000];
| ^
main.c:3:1: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int]
main.c:4:1: warning: data definition has no type or storage class
4 | n,m;
| ^
main.c:4:1: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
main.c:4:3: warning: type defaults to ‘int’ in declaration of ‘m’ [-Wimplicit-int]
4 | n,m;
| ^
main.c:6:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
6 | ad(char i){
| ^~
main.c:19:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
19 | main(){
| ^~~~
main.c: In function ‘main’:
main.c:20:11: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
20 | n=strlen(gets(s));
| ^~~~~~
main.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
+++ |+#include <string.h>
1 | char s[1000010];
main.c:20:11: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
20 | n=strlen(gets(s));
| ^~~~~~
main.c:20:11: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
main.c:20:18: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
20 | n=strlen(gets(s));
| ^~~~
main.c:20:18: warning: passing argument 1 of ‘strlen’ makes pointer from integer without a cast [-Wint-conversion]
20 | n=strlen(gets(s));
| ^~~~~~~
| |
| int
main.c:20:18: note: expected ‘const char *’ but argument is of type ‘int’
main.c:24:9: warning: implicit dec
ソースコード
char s[1000010];
a[140000];
p[140000];
n,m;
ad(char i){
int x;
i-=48;
for(x=1;x<140000;x++){
a[x]+=p[x]*i;
a[x+1]+=a[x]>>25;
a[x]&=0x1FFFFFF;
p[x]*=10;
p[x]+=p[x-1]>>25;
p[x-1]&=0x1FFFFFF;
}
}
main(){
n=strlen(gets(s));
p[1]=1;
for(;n--;)ad(s[n]);
for(n=140000;n--;)m+=__builtin_popcount(a[n]);
printf("%d",m);
return 0;
}
testestest