0_0_20613396_24358.cpp:4:5: error: 'num' does not name a type
num) ans=num; if(t==n+1||d==k) return; __int64 s=num; s &= sum[t]; if(s>=ans)return; dfs(t+1,d+1,num&a[t]); dfs(t+1,d,num);}int main(){ int cas,T=0; cin>>cas; while(cas--) { scanf("%d %d",&n,&k); for(int i=1;i<=n;i++) scanf("%I64d",&a[i]); sort(a+1,a+n+1); sum[n]=a[n]; for(int i=n-1;i>=1;i--) sum[i]=a[i]&sum[i+1]; ans=MAX; dfs(1,0,MAX); printf("Case #%d: ",++T); printf("%I64d\n",ans); } return 0;}
^
0_0_20613396_24358.cpp:4:22: error: expected unqualified-id before 'if'
num) ans=num; if(t==n+1||d==k) return; __int64 s=num; s &= sum[t]; if(s>=ans)return; dfs(t+1,d+1,num&a[t]); dfs(t+1,d,num);}int main(){ int cas,T=0; cin>>cas; while(cas--) { scanf("%d %d",&n,&k); for(int i=1;i<=n;i++) scanf("%I64d",&a[i]); sort(a+1,a+n+1); sum[n]=a[n]; for(int i=n-1;i>=1;i--) sum[i]=a[i]&sum[i+1]; ans=MAX; dfs(1,0,MAX); printf("Case #%d: ",++T); printf("%I64d\n",ans); } return 0;}
^
0_0_20613396_24358.cpp:4:63: error: 'num' was not declared in this scope
num) ans=num; if(t==n+1||d==k) return; __int64 s=num; s &= sum[t]; if(s>=ans)return; dfs(t+1,d+1,num&a[t]); dfs(t+1,d,num);}int main(){ int cas,T=0; cin>>cas; while(cas--) { scanf("%d %d",&n,&k); for(int i=1;i<=n;i++) scanf("%I64d",&a[i]); sort(a+1,a+n+1); sum[n]=a[n]; for(int i=n-1;i>=1;i--) sum[i]=a[i]&sum[i+1]; ans=MAX; dfs(1,0,MAX); printf("Case #%d: ",++T); printf("%I64d\n",ans); } return 0;}
^
0_0_20613396_24358.cpp:4:70: error: 's' does not name a type
num) ans=num; if(t==n+1||d==k) return; __int64 s=num; s &= sum[t]; if(s>=ans)return; dfs(t+1,d+1,num&a[t]); dfs(t+1,d,num);}int main(){ int cas,T=0; cin>>cas; while(cas--) { scanf("%d %d",&n,&k); for(int i=1;i<=n;i++) scanf("%I64d",&a[i]); sort(a+1,a+n+1); sum[n]=a[n]; for(int i=n-1;i>=1;i--) sum[i]=a[i]&sum[i+1]; ans=MAX; dfs(1,0,MAX); printf("Case #%d: ",++T); printf("%I64d\n",ans); } return 0;}
^
0_0_20613396_24358.cpp:4:85: error: expected unqualified-id before 'if'
num) ans=num; if(t==n+1||d==k) return; __int64 s=num; s &= sum[t]; if(s>=ans)return; dfs(t+1,d+1,num&a[t]); dfs(t+1,d,num);}int main(){ int cas,T=0; cin>>cas; while(cas--) { scanf("%d %d",&n,&k); for(int i=1;i<=n;i++) scanf("%I64d",&a[i]); sort(a+1,a+n+1); sum[n]=a[n]; for(int i=n-1;i>=1;i--) sum[i]=a[i]&sum[i+1]; ans=MAX; dfs(1,0,MAX); printf("Case #%d: ",++T); printf("%I64d\n",ans); } return 0;}
^
0_0_20613396_24358.cpp:4:108: error: expected constructor, destructor, or type conversion before '(' token
num) ans=num; if(t==n+1||d==k) return; __int64 s=num; s &= sum[t]; if(s>=ans)return; dfs(t+1,d+1,num&a[t]); dfs(t+1,d,num);}int main(){ int cas,T=0; cin>>cas; while(cas--) { scanf("%d %d",&n,&k); for(int i=1;i<=n;i++) scanf("%I64d",&a[i]); sort(a+1,a+n+1); sum[n]=a[n]; for(int i=n-1;i>=1;i--) sum[i]=a[i]&sum[i+1]; ans=MAX; dfs(1,0,MAX); printf("Case #%d: ",++T); printf("%I64d\n",ans); } return 0;}
^
0_0_20613396_24358.cpp:4:133: error: expected constructor, destructor, or type conversion before '(' token
num) ans=num; if(t==n+1||d==k) return; __int64 s=num; s &= sum[t]; if(s>=ans)return; dfs(t+1,d+1,num&a[t]); dfs(t+1,d,num);}int main(){ int cas,T=0; cin>>cas; while(cas--) { scanf("%d %d",&n,&k); for(int i=1;i<=n;i++) scanf("%I64d",&a[i]); sort(a+1,a+n+1); sum[n]=a[n]; for(int i=n-1;i>=1;i--) sum[i]=a[i]&sum[i+1]; ans=MAX; dfs(1,0,MAX); printf("Case #%d: ",++T); printf("%I64d\n",ans); } return 0;}
^
0_0_20613396_24358.cpp:4:145: error: expected declaration before '}' token
num) ans=num; if(t==n+1||d==k) return; __int64 s=num; s &= sum[t]; if(s>=ans)return; dfs(t+1,d+1,num&a[t]); dfs(t+1,d,num);}int main(){ int cas,T=0; cin>>cas; while(cas--) { scanf("%d %d",&n,&k); for(int i=1;i<=n;i++) scanf("%I64d",&a[i]); sort(a+1,a+n+1); sum[n]=a[n]; for(int i=n-1;i>=1;i--) sum[i]=a[i]&sum[i+1]; ans=MAX; dfs(1,0,MAX); printf("Case #%d: ",++T); printf("%I64d\n",ans); } return 0;}
^
|