結果
| 問題 | No.2562 数字探しゲーム(緑以下コンver.) |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2023-12-04 10:52:10 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 620 bytes |
| 記録 | |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 25,812 KB |
| 最終ジャッジ日時 | 2026-02-24 01:17:25 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function 'main':
main.c:14:14: error: expected ';' before 't'
14 | rrep(t,rd()){
| ^
main.c:7:33: note: in definition of macro 'rrep'
7 | #define rrep(v,e) for(typeof(e) v=e;v--;)
| ^
main.c:14:14: error: 't' undeclared (first use in this function)
14 | rrep(t,rd()){
| ^
main.c:7:37: note: in definition of macro 'rrep'
7 | #define rrep(v,e) for(typeof(e) v=e;v--;)
| ^
main.c:14:14: note: each undeclared identifier is reported only once for each function it appears in
14 | rrep(t,rd()){
| ^
main.c:7:37: note: in definition of macro 'rrep'
7 | #define rrep(v,e) for(typeof(e) v=e;v--;)
| ^
main.c:17:21: error: expected ';' before 'i'
17 | rep(i,9){
| ^
main.c:6:32: note: in definition of macro 'rep'
6 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:17:21: error: 'i' undeclared (first use in this function)
17 | rep(i,9){
| ^
main.c:6:36: note: in definition of macro 'rep'
6 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:19:29: error: expected ';' before 'j'
19 | rep(j,d){
| ^
main.c:6:32: note: in definition of macro 'rep'
6 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:19:29: error: 'j' undeclared (first use in this function)
19 | rep(j,d){
| ^
main.c:6:36: note: in definition of macro 'rep'
6 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:25:22: error: expected ';' before 'i'
25 | rrep(i,9){
|
ソースコード
#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() ({long _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})
#define rep(v,e) for(typeof(e) v=0;v<e;++v)
#define rrep(v,e) for(typeof(e) v=e;v--;)
char wbuf[1<<25];
int main(){
rd_init();
char*wp=wbuf;
rrep(t,rd()){
unsigned m=rd();
unsigned x=0;
rep(i,9){
int d=*rp-'0'; rp+=2;
rep(j,d){
x=x*10+(i+1);
*wp++=i+'1';
}
}
x=m-x*1000000000ull%m;
rrep(i,9){
wp[i]=x%10+'0';
x/=10;
}
wp+=9;
*wp++='\n';
}
write(1,wbuf,wp-wbuf);
_exit(0);
}
tails