답안 #70256

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
70256 2018-08-22T14:17:11 Z Pajaraja 비밀 (JOI14_secret) C++17
컴파일 오류
0 ms 0 KB
#include "secret.h"
#define g return
#define z for(int i
int v[1007][1007],a[1007],n;void t(int l,int r){int s=(l+r)/2;zi=s-1;i>=l;i--)v[i][s]=Secret(a[i],v[i+1][s]);z=s+2;i<=r;i++)v[s+1][i]=Secret(v[s+1][i-1],a[i]);if(l==r)g;t(l,s);t(s+1,r);}void Init(int N,int A[]){n=N;z=0;i<n;i++)v[i][i]=a[i]=A[i];t(0,n-1);}int b(int l,int r,int o,int u){if(l==r) g a[l];int s=(l+r)/2;if(o<=s&&u>s)g Secret(v[o][s],v[s+1][u]);if(u<=s)g b(l,s,o,u);g b(s+1,r,o,u);}int Query(int L, int R){g b(0,n-1,L,R);}

Compilation message

secret.cpp: In function 'void t(int, int)':
secret.cpp:4:63: error: 'zi' was not declared in this scope
 int v[1007][1007],a[1007],n;void t(int l,int r){int s=(l+r)/2;zi=s-1;i>=l;i--)v[i][s]=Secret(a[i],v[i+1][s]);z=s+2;i<=r;i++)v[s+1][i]=Secret(v[s+1][i-1],a[i]);if(l==r)g;t(l,s);t(s+1,r);}void Init(int N,int A[]){n=N;z=0;i<n;i++)v[i][i]=a[i]=A[i];t(0,n-1);}int b(int l,int r,int o,int u){if(l==r) g a[l];int s=(l+r)/2;if(o<=s&&u>s)g Secret(v[o][s],v[s+1][u]);if(u<=s)g b(l,s,o,u);g b(s+1,r,o,u);}int Query(int L, int R){g b(0,n-1,L,R);}
                                                               ^~
secret.cpp:4:63: note: suggested alternative: 'z'
 int v[1007][1007],a[1007],n;void t(int l,int r){int s=(l+r)/2;zi=s-1;i>=l;i--)v[i][s]=Secret(a[i],v[i+1][s]);z=s+2;i<=r;i++)v[s+1][i]=Secret(v[s+1][i-1],a[i]);if(l==r)g;t(l,s);t(s+1,r);}void Init(int N,int A[]){n=N;z=0;i<n;i++)v[i][i]=a[i]=A[i];t(0,n-1);}int b(int l,int r,int o,int u){if(l==r) g a[l];int s=(l+r)/2;if(o<=s&&u>s)g Secret(v[o][s],v[s+1][u]);if(u<=s)g b(l,s,o,u);g b(s+1,r,o,u);}int Query(int L, int R){g b(0,n-1,L,R);}
                                                               ^~
                                                               z
secret.cpp:4:70: error: 'i' was not declared in this scope
 int v[1007][1007],a[1007],n;void t(int l,int r){int s=(l+r)/2;zi=s-1;i>=l;i--)v[i][s]=Secret(a[i],v[i+1][s]);z=s+2;i<=r;i++)v[s+1][i]=Secret(v[s+1][i-1],a[i]);if(l==r)g;t(l,s);t(s+1,r);}void Init(int N,int A[]){n=N;z=0;i<n;i++)v[i][i]=a[i]=A[i];t(0,n-1);}int b(int l,int r,int o,int u){if(l==r) g a[l];int s=(l+r)/2;if(o<=s&&u>s)g Secret(v[o][s],v[s+1][u]);if(u<=s)g b(l,s,o,u);g b(s+1,r,o,u);}int Query(int L, int R){g b(0,n-1,L,R);}
                                                                      ^