結果
| 問題 | No.2707 Bag of Words Encryption |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2024-03-31 16:19:43 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 535 bytes |
| 記録 | |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 25,984 KB |
| 最終ジャッジ日時 | 2026-02-24 01:18:44 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function 'main':
main.c:18:17: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
18 | for(int c;c=*rp++-'A',c>=0;){
| ^~~
main.c:18:17: note: use option '-std=c99', '-std=gnu99', '-std=c11' or '-std=gnu11' to compile your code
main.c:24:22: error: expected ';' before 'c'
24 | rrep(c,26){
| ^
main.c:7:33: note: in definition of macro 'rrep'
7 | #define rrep(v,e) for(typeof(e) v=e;v--;)
| ^
main.c:24:22: error: 'c' undeclared (first use in this function)
24 | rrep(c,26){
| ^
main.c:7:37: note: in definition of macro 'rrep'
7 | #define rrep(v,e) for(typeof(e) v=e;v--;)
| ^
main.c:24:22: note: each undeclared identifier is reported only once for each function it appears in
24 | rrep(c,26){
| ^
main.c:7:37: note: in definition of macro 'rrep'
7 | #define rrep(v,e) for(typeof(e) v=e;v--;)
| ^
ソースコード
#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_skip() while(*rp++>=48)
#define wt(v) ({ulong _z=v;do*--wp=_z%10+48;while(_z/=10);})
#define rrep(v,e) for(typeof(e) v=e;v--;)
typedef unsigned long ulong;
char wbuf[1<<25];
int main(){
int z[26]={};
{
rd_init();
rd_skip();
for(int c;c=*rp++-'A',c>=0;){
z[c]+=1;
}
}
{
char*wp=wbuf+sizeof wbuf;
rrep(c,26){
wt(z[c]);
}
write(1,wp,wbuf+sizeof wbuf-wp);
}
_exit(0);
}
tails