結果
| 問題 |
No.2463 ストレートフラッシュ
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2023-09-13 10:42:19 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,400 bytes |
| コンパイル時間 | 809 ms |
| コンパイル使用メモリ | 26,752 KB |
| 最終ジャッジ日時 | 2025-01-07 05:40:54 |
| 合計ジャッジ時間 | 1,877 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function 'f2':
main.c:30:13: error: expected ';' before 'y'
30 | rep(y,m){
| ^
main.c:8:32: note: in definition of macro 'rep'
8 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:30:13: error: 'y' undeclared (first use in this function)
30 | rep(y,m){
| ^
main.c:8:36: note: in definition of macro 'rep'
8 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:30:13: note: each undeclared identifier is reported only once for each function it appears in
30 | rep(y,m){
| ^
main.c:8:36: note: in definition of macro 'rep'
8 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:32:21: error: expected ';' before 'x'
32 | rep(x,n-3){
| ^
main.c:8:32: note: in definition of macro 'rep'
8 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:32:21: error: 'x' undeclared (first use in this function)
32 | rep(x,n-3){
| ^
main.c:8:36: note: in definition of macro 'rep'
8 | #define rep(v,e) for(typeof(e) v=0;v<e;++v)
| ^
main.c:10:35: error: expected ';' before 't'
10 | #define se(a,b) (a<b||({typeof(a) t=a;a=b;b=t;}))
| ^
main.c:41:33: note: in expansion of macro 'se'
41 | se(a0,a1);
| ^~
main.c:10:35: error: expected ';' before 't'
10 | #define se(a,b) (a<b||({typeof(a) t=a;a=b;b=t;}))
| ^
main.c:42:33: note: in expansion of macro 'se'
42 | se(a0,a2);
| ^~
main.c:10:35: error: expected ';' before 't'
10 | #define se(a,b) (a<b||({typeof(
ソースコード
#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() ({int _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})
#define wt(v) ({ulong _z=v;do*--wp=_z%10+48;while(_z/=10);})
#define wt1(v) ({char wbuf[64],*wp=wbuf+sizeof wbuf;wt(v);write(1,wp,wbuf+sizeof wbuf-wp);})
#define rep(v,e) for(typeof(e) v=0;v<e;++v)
#define chmin(v,a) (v=v<=a?v:a)
#define se(a,b) (a<b||({typeof(a) t=a;a=b;b=t;}))
typedef unsigned long ulong;
int a[512][512];
void f1(int*np,int*mp){
rd_init();
*np=rd();
*mp=rd();
int j=0;
while(*rp){
int x=rd();
int y=rd();
a[y-1][x-1]=j++;
}
}
int f2(int n,int m){
int z=1<<18;
rep(y,m){
a[y][n]=a[y][0];
rep(x,n-3){
int a0=a[y][x+0];
int a1=a[y][x+1];
int a2=a[y][x+2];
int a3=a[y][x+3];
int a4=a[y][x+4];
int i=4;
int t=0;
{
se(a0,a1);
se(a0,a2);
se(a0,a3);
se(a0,a4);
int d=(a0-i+4)/5u;
i+=d*5;
t+=d;
}
{
se(a1,a2);
se(a1,a3);
se(a1,a4);
int d=(a1-i+3)/4u;
i+=d*4;
t+=d;
}
{
se(a2,a3);
se(a2,a4);
int d=(a2-i+2)/3u;
i+=d*3;
t+=d;
}
{
se(a3,a4);
int d=(a3-i+1)/2u;
i+=d*2;
t+=d;
}
{
int d=(a4-i+0)/1u;
i+=d*1;
t+=d;
}
chmin(z,t);
}
}
return z;
}
int main(){
int n,m;
f1(&n,&m);
int z=f2(n,m);
wt1(z);
_exit(0);
}
tails