submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s353077352 | p00461 | C++ | #include<cstdio>
main(){int n,m,i,a,c[1000001];for(std::string s;std::cin>>n>>m>>s,n;printf("%d\n",a))for(a=0,i=m;--i;a+=c[i]>=n)c[i]=s.substr(i,3)=="IOI"?c[i+2]+1:0;} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){int n,m,i,a,c[1000001];for(std::string s;std::cin>>n>>m>>s,n;printf("%d\n",a))for(a=0,i=m;--i;a+=c[i]>=n)c[i]=s.substr(i,3)=="IOI"?c[i+2]+1:0;}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:40: error: 'string' is ... |
s520259838 | p00461 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int n,m,ans;
string a,b;
char s[1000000];
while(cin>>n){
ans=0;
a="I";
for(int i=0;i<n;i++){
a+="OI";}
cin>>m;
for(int i=0;i<m;i++){
cin>>s[i];}
for(int i=0;i<m-2n-1;i++){
b="";
if(s[i]="I"){
for(int j=i;j<2n+i+1;j++){
b+=s[j];}}
if(a==b){ans++;}
cou... | a.cc: In function 'int main()':
a.cc:17:17: error: unable to find numeric literal operator 'operator""n'
17 | for(int i=0;i<m-2n-1;i++){
| ^~
a.cc:19:9: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
19 | if(s[i]="I"){
| ^~~
| |
| ... |
s426130370 | p00461 | C++ | #include <string>
#include <vector>
using namespace std;
vector<int> V;
int main() {
int n,m;
while(cin>>n,n) {
cin>>m;
string str;
cin>>str;
V.clear();
int i;
for(i=0;i<(m-2);i++) {
if(str.substr(i,3)=="IOI") {
int count=1;
for(i+=3;i<(m-1);i+=2) {
if(str.substr(i,2)=="OI") count++; else ... | a.cc: In function 'int main()':
a.cc:7:15: error: 'cin' was not declared in this scope
7 | while(cin>>n,n) {
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include <vector>
+++ |+#include <iostream>
... |
s421473108 | p00462 | C | #include <stdio.h>
#include <stdlib.h>
#define D_MAX 1000000000
#define N_MAX 100000
#define M_MAX 10000
#define TRUE 1
#define FALSE 0
int ad[N_MAX+1];
int ak[M_MAX+1];
int awork[N_MAX+1];
/* 配列 x[ ] の left から right の要素のマージソートを行う */
void MergeSort(int x[ ], int left, int right)
{
int mid, i, j, k;
if (... | main.c: In function 'input':
main.c:47:21: error: 'd' undeclared (first use in this function)
47 | scanf("%d",&d);
| ^
main.c:47:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:49:29: error: 'n' undeclared (first use in this function... |
s961206147 | p00462 | C | #include <stdio.h>
#include <stdlib.h>
#define D_MAX 1000000000
#define N_MAX 100000
#define M_MAX 10000
#define min(x,y) (((x)<(y))?(x):(y))
int d;
int n;
int m;
int ad[N_MAX+1];
int ak[M_MAX+1];
int temp[N_MAX+1];
void MergeSort(int array[],int left,int right){
int awork[N_MAX+1];
int mid;
int i;
int j;
... | main.c: In function 'main':
main.c:104:25: error: expected ';' before 'for'
104 | MergeSort( ak, 1, m)
| ^
| ;
105 | for( i=1; i<=m; i++){
| ~~~
|
s767122503 | p00462 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j,k;
int d,n,m,a[1000000005],x,ans=0;
int main(){
scanf("%d",&d);
while(d!=0){
for(i=0;i<=d;i++)a[i]=0;
a[0]=1,a[d]=1;
scanf("%d",&n);
scanf("%d",&m);
for(i=0;i<n-1;i++){
scanf("%d",&x);
a[x]=1;
}
for(i=0;i<m;i++){
scanf("%d",&x);
... | /tmp/ccoTc3b4.o: in function `main':
main.c:(.text+0xe3): relocation truncated to fit: R_X86_64_PC32 against symbol `x' defined in .bss section in /tmp/ccoTc3b4.o
main.c:(.text+0x100): relocation truncated to fit: R_X86_64_PC32 against symbol `x' defined in .bss section in /tmp/ccoTc3b4.o
main.c:(.text+0x14d): relocati... |
s879295000 | p00462 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j,k;
int d,n,m,a[100005],b[10005],x,ans=0;
int Min,Max,Mid;
int comp(const void *p,const void *q){
return *(int *)p-*(int *)q;
}
int main(){
scanf("%d",&d);
while(d!=0){
scanf("%d",&n);
scanf("%d",&m);
for(i=1;i<=n-1;i++)scanf("%d",&a[i]);
a[0]=... | main.c: In function 'main':
main.c:23:34: error: expected ';' before '{' token
23 | for(i=0;i<m;i++)8{
| ^
| ;
|
s869728785 | p00462 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j,k;
__int64 d,n,m,a[100005],b[10005],x,ans=0;
__int64 p,q,r;
int comp(const void *p,const void *q){
return *(__int64 *)p-*(__int64 *)q;
}
int main(){
scanf("%lld",&d);
while(d!=0){
scanf("%lld",&n);
scanf("%lld",&m);
for(i=1;i<=n-1;i++)scanf("%ll... | main.c:6:1: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 d,n,m,a[100005],b[10005],x,ans=0;
| ^~~~~~~
| __int64_t
main.c:7:1: error: unknown type name '__int64'; did you mean '__int64_t'?
7 | __int64 p,q,r;
| ^~~~~~~
| __int64_t
main.c: In function 'comp':
mai... |
s271581084 | p00462 | C | #include<stdio.h>
#include<algorithm>
int*t,p="%d\n",n,m,d,i,s[99999];main(){for(;scanf("%d%d%d",&d,&n,&m),s[i=n]=d;printf(p,i)){for(;--i;)scanf(p,s+i);for(std::sort(s,s+n);m--;i+=std::min(*t-d,d-t[-1]))scanf(p,&d),t=std::upper_bound(s,s+n,d);}} | main.c:2:9: fatal error: algorithm: No such file or directory
2 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s114448640 | p00462 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s359428545 | p00462 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> pll;
#define FOR(i,n,m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i,n) FOR(i,n,0)
#define OF64 std::setprecision(10)
const ll MOD = 1000000007;
const ll INF = (ll)1e15;
ll d[100005];
int main()
{
while(true)
{
ll D,N,M;
... | a.cc: In function 'int main()':
a.cc:20:11: error: expected ';' before 'if'
20 | cin>>D
| ^
| ;
21 | if(D==0)break;
| ~~
|
s256672049 | p00462 | C++ | #include <map>
#include <set>
#include <cmath>
#include <queue>
#include <stack>
#include <cctype>
#include <cstdio>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iostream>
#include... | a.cc: In function 'int main()':
a.cc:29:7: error: 'whlie' was not declared in this scope
29 | whlie(cin >> d >> n >> m, d){
| ^~~~~
|
s584779970 | p00462 | C++ | #include<string.h>
#include<vector>
#include<queue>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int INF=1001001001;
int map[10][10000];//0????????????
int main(){
while(1){
int d,n,m;//????????¨?????????????????°?????¨???????????°
int N[100002];
scanf("%d",&d);
if(d==0)break;
scanf... | a.cc: In function 'int main()':
a.cc:18:17: error: 'scanf' was not declared in this scope
18 | scanf("%d",&d);
| ^~~~~
a.cc:24:17: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(N,N+n);
| ^~~~
| ... |
s482539800 | p00462 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define len(a) sizeof(a)
#define ll long long
#define pii pair<int... | a.cc: In function 'void solve()':
a.cc:36:31: error: 'v' was not declared in this scope
36 | if(ind<d.size()) mi=min(mi,v[ind]-k);
| ^
a.cc:38:27: error: 'v' was not declared in this scope
38 | if(ind>=0) mi=min(mi,k-v[ind]);
| ^
|
s275993283 | p00462 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
typedef vector<int> vi;
#define PB push_back
#define rep(i,x) for(int i=0;i<(x);++i)
#define all(a) a.begin(),a.end()
template<typename T>T get(){T a;cin>>a;return a;}
int main()
{
int D, N, M;
vi d;
while (scanf("%d", &D), D) {
sca... | a.cc: In function 'T get()':
a.cc:13:33: error: 'cin' was not declared in this scope
13 | template<typename T>T get(){T a;cin>>a;return a;}
| ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #inclu... |
s554073575 | p00462 | C++ | #include <fstream>
#include <algorithm>
#include <cmath>
#include <cstdint>
using namespace std;
#define MAX_N 100002
#define MAX_M 10001
uint64_t D,N,M,d[MAX_N],k[MAX_M];
uint64_t gd(uint64_t a,uint64_t b)
{
return min(abs(a - b),abs(abs(a - b) - 8));
}
int main(void)
{
cin >> D >> N >> M;
for(int i = 2;i <= N... | a.cc: In function 'uint64_t gd(uint64_t, uint64_t)':
a.cc:15:23: error: call of overloaded 'abs(uint64_t)' is ambiguous
15 | return min(abs(a - b),abs(abs(a - b) - 8));
| ~~~^~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/st... |
s507235495 | p00462 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(int argc, char const *argv[]){
int d, n, m;
vector<int> store;
store.push_back(0);
while (cin>>d, d){
int ans = 0;
cin>>n;
cin>>m;
for (int i = 0; i < m-1; i++){
int s;
cin>>s;... | a.cc: In function 'int main(int, const char**)':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(begin(store), end(store));
| ^~~~
| short
|
s347495535 | p00462 | C++ | #include<map>
using namespace std;
#define SIZE 100002
#define QUERY 10001
int shop[SIZE];
int Bsearch(int n,int target){
int l=0,r=n-1;
int mid;
while(l < r){
mid = (r+l)/2;
if ( shop[mid]> target){
r=mid;
}else if ( shop[mid]<target){
l=mid;
}else return 0;
if ( l+1== r )break;
... | a.cc:36:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
36 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:38:9: error: 'cin' was not declared in this scope
38 | while(cin>>d>>n>>m && d){
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>';... |
s669404889 | p00462 | C++ | #include<algorithm>
using namespace std;
#define SIZE 100002
#define QUERY 10001
int shop[SIZE];
int Bsearch(int n,int target){
int l=0,r=n-1;
int mid;
while(l < r){
mid = (r+l)/2;
if ( shop[mid]> target){
r=mid;
}else if ( shop[mid]<target){
l=mid;
}else return 0;
if ( l+1== r )b... | a.cc:27:17: error: 'map' has not been declared
27 | int solve(int n,map<int,int> &M){
| ^~~
a.cc:27:20: error: expected ',' or '...' before '<' token
27 | int solve(int n,map<int,int> &M){
| ^
a.cc: In function 'int solve(int, int)':
a.cc:28:3: error: 'map' was not d... |
s846204049 | p00462 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#define sint(i) scanf("%d",&i);
#define sintt(i,j) scanf("%d%d",&i,&j);
#define sinttt(i,j,k) scanf("%d%d%d",&i,&j,&k);
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int mise[100002];
int main(){
while(1){
int d,n,m;
sint(d);
if(d==0)break;
... | a.cc: In function 'int main()':
a.cc:29:17: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(mise,mise+n);
| ^~~~
| short
|
s593721944 | p00462 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<stack>
#include<algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define reps(i,n) for(int i=1;i<=n;i++)
vector<int> mise;
int main(){
while(1){
int d,m,n;
scanf("%d",&d);
if(d==0)break;
scanf(... | a.cc: In function 'int main()':
a.cc:41:43: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int*' in initialization
41 | int *p=lower_bound(mise.begin(),mise.end(),a);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| ... |
s696766148 | p00462 | C++ | #include<cstdio>
#include<iostream>
#include<string>
#include<map>
#include<queue>
#include<set>
#include<algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define reps(i,n) for(int i=1;i<=n;i++)
int main(){
while(1){
int d,n,m;
cin>>d;
if(d==0)break;
cin>>n>>m;
vector<int> shop;
... | a.cc: In function 'int main()':
a.cc:38:45: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int*' in initialization
38 | int *b = upper_bound(shop.begin(),shop.end(),a);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| ... |
s486693925 | p00462 | C++ | #include<cstdio>
#include<vector>
using namespace std;
int main(void){
int d;
while(scanf("%d", &d) && d != 0){
int S[100009];
int n,m;
int temp;
int l,ls,ss;
int ans= 0;
scanf("%d%d", &n, &m);
S[0] = 0;
S[n] = d;
for(int i = 1; i < n; i++){
scanf("%d", &S[i]);
}
sort(S,S+n);
... | a.cc: In function 'int main()':
a.cc:24:17: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(S,S+n);
| ^~~~
| short
a.cc:28:35: error: 'upper_bound' was not declared in this scope
28 | int *mx = upper_... |
s313266715 | p00462 | C++ | #include<stdio.h>
#include<algorithm>
int*it,shop[100001],n,m,d,i;
int main(){
for(;scanf("%d%d%d",&d,&n,&m),shop[n]=d;i=!printf("%d\n",i)){
for(i=n;i--;)
scanf("%d",shop+i)
for(std::sort(shop,shop+n);m--;i+=min(*it - d, d - it[-1] ))
scanf("%d",&d),
it = std::upper_bound( shop, shop+n, d );
}
} | a.cc: In function 'int main()':
a.cc:7:43: error: expected ';' before 'for'
7 | scanf("%d",shop+i)
| ^
| ;
8 | for(std::sort(shop,shop+n);m--;i+=min(*it - d, d - it[-1] ))
... |
s252381518 | p00462 | C++ | #include<stdio.h>
#include<algorithm>
*it,shop[100001],n,m,d,i;
main(){
for(;scanf("%d%d%d",&d,&n,&m),shop[i=n]=d;i=!printf("%d\n",i)){
for(;--i;)
scanf("%d",shop+i);
for(std::sort(shop,shop+n);m--;i+=std::min(*it - d, d - it[-1] ))
scanf("%d",&d),
it = std::upper_bound( shop, shop+n, d );
}
} | a.cc:3:4: error: expected constructor, destructor, or type conversion before ',' token
3 | *it,shop[100001],n,m,d,i;
| ^
a.cc:3:17: error: expected constructor, destructor, or type conversion before ',' token
3 | *it,shop[100001],n,m,d,i;
| ^
a.cc:3:19: error: expected constructor... |
s552088517 | p00462 | C++ | #include<stdio.h>
#include<algorithm>
int*it,shop[100001],n,m,d;
main(i){
for(;scanf("%d%d%d",&d,&n,&m),shop[i=n]=d;i=!printf("%d\n",i)){
for(;--i;)
scanf("%d",shop+i);
for(std::sort(shop,shop+n);m--;i+=std::min(*it - d, d - it[-1] ))
scanf("%d",&d),
it = std::upper_bound( shop, shop+n, d );
}
} | a.cc:4:5: error: expected constructor, destructor, or type conversion before '(' token
4 | main(i){
| ^
|
s842296213 | p00462 | C++ | #include<stdio.h>
#include<algorthm>
int*t,s[99999],n,m,d,i;
main(){
for(;scanf("%d%d%d",&d,&n,&m),s[i=n]=d;printf("%d\n",i)){
for(;--i;)
scanf("%d",s+i);
for(std::sort(s,s+n);m--;i+=std::min(*t - d, d - t[-1] ))
scanf("%d",&d),
t = std::upper_bound( s, s+n, d );
}
} | a.cc:2:9: fatal error: algorthm: No such file or directory
2 | #include<algorthm>
| ^~~~~~~~~~
compilation terminated.
|
s175500068 | p00462 | C++ | #include<stdio.h>
#include<algorithm>
int*t,,n,m,d,i,s[99999];
main(){
for(;scanf("%d%d%d",&d,&n,&m),s[i=n]=d;printf("%d\n",i)){
for(;--i;)
scanf("%d",s+i);
for(std::sort(s,s+n);m--;i+=std::min(*t - d, d - t[-1] ))
scanf("%d",&d),
t = std::upper_bound( s, s+n, d );
}
} | a.cc:3:7: error: expected unqualified-id before ',' token
3 | int*t,,n,m,d,i,s[99999];
| ^
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
|
s328884230 | p00462 | C++ | #include<stdio.h>
#include<algorithm>
int*t,p="%d\n",n,m,d,i,s[99999];main(){for(;scanf("%d%d%d",&d,&n,&m),s[i=n]=d;printf(p,i)){for(;--i;)scanf(p,s+i);for(std::sort(s,s+n);m--;i+=std::min(*t-d,d-t[-1]))scanf(p,&d),t=std::upper_bound(s,s+n,d);}} | a.cc:3:9: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
3 | int*t,p="%d\n",n,m,d,i,s[99999];main(){for(;scanf("%d%d%d",&d,&n,&m),s[i=n]=d;printf(p,i)){for(;--i;)scanf(p,s+i);for(std::sort(s,s+n);m--;i+=std::min(*t-d,d-t[-1]))scanf(p,&d),t=std::upper_bound(s,s+n,d);}}
| ^~~~~~
... |
s515394909 | p00462 | C++ | #include<stdio.h>
#include<algorithm>
int*t,n,m,d,i,s[99999];
main(){
for(;scanf("%d%d%d",&d,&n,&m),s[i=n]=d;printf("%d\n",i)){
for(;--i;)
scanf("%d",s+i);
for(std::sort(s,s+n);m--;i+=fmin(*t-d,d-t[-1]))
scanf("%d",&d),
t=std::upper_bound(s,s+n,d);
}
} | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:8:45: error: 'fmin' was not declared in this scope
8 | for(std::sort(s,s+n);m--;i+=fmin(*t-d,d-t[-1]))
| ... |
s554849087 | p00462 | C++ | #include<iostream>
#include<algo.h>
using namespace std;int*t,n,m,d,i,s[99999];main(){for(;cin>>d>>n>>m,s[i=n]=d;cout<<i<<'\n'){for(;--i;)cin>>s[i];for(sort(s,s+n);m--;t=upper_bound(s,s+n,d),i+=min(*t-d,d-t[-1]))cin>>d;}} | a.cc:2:9: fatal error: algo.h: No such file or directory
2 | #include<algo.h>
| ^~~~~~~~
compilation terminated.
|
s431830390 | p00462 | C++ | #include<iostream.h>
#include<algorithm.h>
using namespace std;
int*t,n,m,d,i,s[99999];
main(){
for(;cin>>d>>n>>m,s[i=n]=d;cout<<i<<endl){
for(;--i;)
cin>>s[i];
for(sort(s,s+n);m--;t=upper_bound(s,s+n,d),i+=min(*t-d,d-t[-1]))
cin>>d;
}
} | a.cc:1:9: fatal error: iostream.h: No such file or directory
1 | #include<iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s926448234 | p00462 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
while(true) {
int d, n, m;
vector<int> s;
scanf("%d", &d);
if(d == 0)
break;
s.resize(n);
for(int i = 0; i < n; ++i)
scanf("%d", &s[i]);
sort(s.begin(), s.end());
s.push_back(s[0] + d);
s.push_back(s[n - 1] - d);
sort(s.begin(),... | a.cc: In function 'int main()':
a.cc:25:20: error: no matching function for call to 'lower_bound(std::vector<int>::iterator, std::vector<int>::iterator)'
25 | int r = lower_bound(s.begin(), s.end()) - s.begin();
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:62,
... |
s605308470 | p00462 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
while(true) {
int d, n, m;
vector<int> s;
scanf("%d", &d);
if(d == 0)
break;
s.resize(n);
for(int i = 0; i < n; ++i)
scanf("%d", &s[i]);
sort(s.begin(), s.end());
s.push_back(s[0] + d);
s.push_back(s[n - 1] - d);
sort(s.begin(),... | a.cc: In function 'int main()':
a.cc:26:1: error: 'l' was not declared in this scope
26 | l = r - 1;
| ^
|
s851815878 | p00462 | C++ | #include <iostream>
using namespace std;
int main()
{
int dp[10000],to,store[100000];
int d,n,m,minsum,prmin,x;
cin >> d;
while(d != 0){
cin >> n >> m;
store[0] = 0;
for(int i = 1; i < n; i++){
cin >> store[i];
}
minsum = 0;
for(int i = 0; i < m; i++){
cin >> to;
prmin = INT_MAX;
for(int... | a.cc: In function 'int main()':
a.cc:21:33: error: 'INT_MAX' was not declared in this scope
21 | prmin = INT_MAX;
| ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #includ... |
s990485588 | p00462 | C++ | #include <algorithm>
#include <iostream>
#include <functional>
#include <vector>
#include <cstdlib>
using namespace std;
int D,N,M,K;
int in;
int main(void)
{
while(cin >> D, D){
static vector<long> d,k;
static vector<long> pos;
cin >> N >> M;
d.push_back(0);
d.push_back(0);
for(int i = 0; i < N-1; i... | a.cc: In function 'int main()':
a.cc:39:36: error: 'miin' was not declared in this scope; did you mean 'main'?
39 | long ans = miin( min( abs(d[pos]-k[i]), abs(d[pos-1]-k[i]) ), abs(d[pos+1]-k[i]) );
| ^~~~
| ma... |
s601807289 | p00462 | C++ | #include<vector>
#include<algorithm>
using namespace std;
int froms[100002];
int D, N, M;
int main()
{
loop:
cin >> D;
if(!D)
return 0;
cin >> N >> M;
froms[0] = 0;
for(int i = 1; i < N; i++)
{
int d;
cin >> d;
froms[i] = d;
}
froms[N] = D;
sort(froms, froms + N + 1);
int ans = 0... | a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
11 | cin >> D;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<algorithm>
+++ |+#include <iostream>
3 | using namespace ... |
s956494145 | p00463 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:51: error: array required, but int found
else if(swp[i][0]<k) tot=Math.min(tot,tot-scr[pos[i][0]]+scr[pos[i][1]]);
^
Main.java:51: error: array required, but int found
else if(swp[i][0]<k) tot=Math.min(tot,tot-scr[pos[i][0]]+scr[pos[i][1]]);
... |
s008150344 | p00463 | C++ | #include<bits\stdc++.h>
using namespace std;
typedef pair<int ,int > pii;
typedef pair<int ,pii > pipii;
void solve();
int N,M,H,K;
int S[1010];
int now[1010];
int main()
{
while(scanf("%d%d%d%d",&N,&M,&H,&K),N + M + H + K)
{
for(int i = 1; i < N + 1; i++)
{
scanf("%d",&S[i]);
... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s470000461 | p00463 | C++ | #include<bits\stdc++.h>
using namespace std;
typedef pair<int ,int > pii;
typedef pair<int ,pii > pipii;
void solve();
int N,M,H,K;
int S[1010];
int now[1010];
int main()
{
while(scanf("%d%d%d%d",&N,&M,&H,&K),N + M + H + K)
{
for(int i = 1; i < N + 1; i++)
{
scanf("%d",&S[i]);
... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s717701975 | p00463 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
#include<unordered_map>
#include<chrono>
using namespace std;
typedef long long ll;
ll a[1001];
struct A{
ll h;//hi... | a.cc: In function 'bool operator<(J, J)':
a.cc:37:34: error: expected unqualified-id before '}' token
37 | bool operator<(J a,J b){return a.}
| ^
a.cc:37:34: error: expected ';' before '}' token
37 | bool operator<(J a,J b){return a.}
| ... |
s464339310 | p00463 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
#include<unordered_map>
#include<chrono>
using namespace std;
typedef long long ll;
ll a[1001];
struct A{
ll h;//hi... | a.cc: In function 'bool operator<(J, J)':
a.cc:37:34: error: expected unqualified-id before '}' token
37 | bool operator<(J a,J b){return a.}
| ^
a.cc:37:34: error: expected ';' before '}' token
37 | bool operator<(J a,J b){return a.}
| ... |
s467355627 | p00463 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define reps(i,n) for(int i=1;i<=n;i++)
#define sint(i) scanf("%d",&i);
#define sintt(i,j) scanf("%d%d",&i,&j);
#define sinttt(i,j,k) scanf("%d%d%d",&i,&j,&k);
#define INF 1010000000
int hav[1001];
int ge... | a.cc: In function 'int main()':
a.cc:37:17: error: 'sort' was not declared in this scope; did you mean 'short'?
37 | sort(bou,bou+m);
| ^~~~
| short
a.cc:47:25: error: reference to 'get' is ambiguous
47 | get[hav[i]]=point[i];
... |
s068715518 | p00463 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<stack>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define reps(i,n) for(int i=1;i<=n;i++)
vector<pair<int,int> > y;
int main(){
while(1){
int n,m,h,k;
scanf("%d%d%d%d",&n,&m,&h,&k);
if(n==0)break;
... | a.cc: In function 'int main()':
a.cc:35:17: error: 'sort' was not declared in this scope; did you mean 'short'?
35 | sort(y.begin(),y.end());
| ^~~~
| short
|
s519173708 | p00463 | C++ | #include <iostream>
#include <vector>
#include <set>
#include <utility>
using namespace std;
typedef pair<int, int> pii;
int main(){
while(true){
int n, m, h, k;
cin >> n >> m >> h >> k;
if(n == 0 && m == 0 && h == 0 && k == 0){ break; }
vector<i... | a.cc: In function 'int main()':
a.cc:18:17: error: 'sort' was not declared in this scope; did you mean 'short'?
18 | sort(lines.begin(), lines.end());
| ^~~~
| short
|
s675286178 | p00463 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <... | a.cc: In function 'int in()':
a.cc:33:19: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
33 | int in() { int x; scanf_s("%d", &x); return x; }
| ^~~~~~~
| scanf
|
s910893181 | p00463 | C++ | #include <iostream>
#include <algorithm>
#include <set>
using namespace std;
int n,m,h,k;
inline long long sumk(int *score, int k){
long long ret = 0;
for(int i=0;i<k;i++) ret += score[i];
return ret;
}
int main(){
while(cin >> n >> m >> h >> k){
bool edge[h-1][n-1];
int point[n];
int score[n];
int wo... | a.cc: In function 'int main()':
a.cc:48:17: error: 'it' was not declared in this scope; did you mean 'int'?
48 | it = cand.begin();
| ^~
| int
|
s221420198 | p00463 | C++ | #include <iostream>
#include <cstring>
#include <vector>
using namespace std;
int n,m,h,k;
vector< pair<int,int> > g[1000];
int v[1000];
short dp[1010][1010][2];
short dp2[1010][1010][2];
int dfs(int x,int y,int l){
if( dp[x][y][l] != -1 ) return dp[x][y][l];
if( y == h ) return x;
if( l == 0 ){
int ny = ... | a.cc: In function 'int dfs(int, int, int)':
a.cc:21:28: error: 'upper_bound' was not declared in this scope
21 | int ny = (*upper_bound(g[x].begin(),g[x].end(),make_pair(y,999999))).first;
| ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:64:46: error: 'sort' was not... |
s198954762 | p00463 | C++ | #include <cstdio>
#include <queue>
#include <vector>
int main(void){
int n,m,h,k;
scanf("%d%d%d%d",&n,&n,&h,&k);
while(n!=0){
int ten[1000]={0};
int bo[100000]={0};
int maps[100000][1000]={0};
int i=0;
priority_queue<pair<int,int> > que;
for(i=0;i<n;i++)scanf("%d",&(ten[i]));
pair<int... | a.cc: In function 'int main()':
a.cc:13:5: error: 'priority_queue' was not declared in this scope; did you mean 'std::priority_queue'?
13 | priority_queue<pair<int,int> > que;
| ^~~~~~~~~~~~~~
| std::priority_queue
In file included from /usr/include/c++/14/queue:66,
from a.cc... |
s722603049 | p00463 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
pair<int,int> make_pair(int a,int b){
pair<int,int> ret; ret.first=a; ret.second=b; return ret;
}
bool f(pair<int,int> a,pair<int,int> b){
return a.second<=b.second;
}
int main(){
while(1){
int n,m,h,k,sum=0,ret=2000000001;
int s[1002]
... | a.cc: In function 'int main()':
a.cc:18:9: error: expected initializer before 'char'
18 | char a[100000+2],b[100000+2];
| ^~~~
a.cc:25:29: error: 's' was not declared in this scope
25 | scanf("%d",&s[i]);
| ^
a.cc:30:31: error: 'a' was not de... |
s145253011 | p00464 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int x = 0;
int y = 0;
int h;
int w;
int n;
int[][] route;
while(ture){
h = scan.nextInt();
w = scan.nextInt();
n = scan.nextInt();
if(h == 0 && w == 0 && n == 0){
... | Main.java:12: error: cannot find symbol
while(ture){
^
symbol: variable ture
location: class Main
1 error
|
s983830748 | p00464 | C | #include<stdio.h>
#include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
int h,w,n,i,j;
int kan[10000][10000];
int dp[10000][10000];
int main(void){
scanf("%d %d %d",&h,&w,&n);
while(h!=0 && w!=0 && n!=0){
for(i=1;i<=h;i++){
for(j=1;j<=w;j++){
scanf("%d",&kan[i][j]); //kan=kanbann
... | main.c:2:9: fatal error: cstdio: No such file or directory
2 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s284080859 | p00464 | C | #include<stdio.h>
int main(void) {
int h, w, n, key[1005][1005], x, y, i, j, k, l;
scanf("%d %d %d", &h, &w, &n);
while ( 1 ) {
for ( i = 1; i <= h + 1; i++ ) {
for ( j = 1; j <= j + 1; j++ ) {
scanf("%d", &[i][j]);
}
}
for ( k = 0; k < n; k++ ) {
x = y ... | main.c: In function 'main':
main.c:8:26: error: expected expression before '[' token
8 | scanf("%d", &[i][j]);
| ^
main.c:13:17: error: expected expression before ')' token
13 | while () {
| ^
main.c:22:50: error: expected ';' before '}' t... |
s584309504 | p00464 | C | #include<stdio.h>
int h,w,n;
bool d[1000][1000];
int t[1000][1000];
int i,j;
int main(){
while(1){
scanf("%d %d %d",&h,&w,&n);
if(h==0)return 0;
for(i=0;i<h;i++)for(j=0;j<w;j++){
int x;
scanf("%d",&x);
if(x==1)d[i][j]=true;
if(x==0)d[i][j]=false;
t[i][j]=0;
}
t[0][0]=n-1;
for(i=0;i<h;i++)fo... | main.c:3:1: error: unknown type name 'bool'
3 | bool d[1000][1000];
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 | int h,w,n;
main.c: In function 'main':
main.c:14:41: ... |
s171267285 | p00464 | C++ | #include<bits/stdc++.h>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
int h,w,n,c[1000][1000];
int dp[1001][1001];
int d[1000][1000];
int main(){
while(scanf("%d%d%d",&h,&w,&n),h){
for(int i=0;i<h;i++) for(int j=0;j<w;j++) scanf("%d",&c[i][j]);
for(int i=0;i<=100... | a.cc: In function 'int main()':
a.cc:35:10: error: expected '}' at end of input
35 | }
| ^
a.cc:12:11: note: to match this '{'
12 | int main(){
| ^
|
s123058000 | p00464 | C++ | #include<iostream>
#define lol(i,n) for(int i=0;i<n;i++)
using namespace std;
int d[1010][1010],h,w,a;
int main(){
while(cin>>h>>w>>a&&h){
int x=0,y=0;
memset(d,0,sizeof(d));
d[0][0]=a;
lol(i,h)lol(j,w){
cin>>a;
d[i+1][j]+=d[i][j]/2+d[i][j]%2*(1-a);
d[i][j+1]+=d[i][j]/2+d[i][j]%2*a;
d[i][j]+=a;
... | a.cc: In function 'int main()':
a.cc:8:5: error: 'memset' was not declared in this scope
8 | memset(d,0,sizeof(d));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2 | ... |
s219081584 | p00464 | C++ | while(1) {
cin>>h>>w>>n;
if(h==0&&w==0&&n==0) break;
int r[w][h];
for(int i=0; i<h; i++)
for(int j=0; j<w; j++)
cin>>r[j][i];
int x,y;
for(long l=0; l<n; l++) {
x=0,y=0;
while(1) {
if(x>w-1 || y>h-1) break;
if(r[x][y]==0) {
r[x][y]=1;
y++;
}else{
r[x][y]=0;
... | a.cc:1:3: error: expected unqualified-id before 'while'
1 | while(1) {
| ^~~~~
a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
|
s044527351 | p00464 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <bitset>
#include <fstream>
#include <cmath>
#include <ctime>
#include <numeric>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int... | a.cc: In function 'int main()':
a.cc:31:17: error: 'memset' was not declared in this scope
31 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
13 | #include <numeric>
++... |
s144296796 | p00464 | C++ | #include <cstdio>
#include <iostream>
int num[1005][1005],h,w,n;
pair<int,int>p;
int main(){
while(1){
scanf("%d %d %d",&h,&w,&n);
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
scanf("%d",&num[j][i]);
}
}
int y=1,s=1,cou=0;
while(1){
cou++;
if(num[y][s]){
y++;
num[y][s]=(num[y][s]+1)%2;
if(y==w+1){
p=make_pair(y,s);
br... | a.cc:4:1: error: 'pair' does not name a type
4 | pair<int,int>p;
| ^~~~
a.cc: In function 'int main()':
a.cc:20:1: error: 'p' was not declared in this scope
20 | p=make_pair(y,s);
| ^
a.cc:20:3: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
20 | p=make_pair(y,s)... |
s120286390 | p00464 | C++ | #include <cstdio>
#include <iostream.h>
int num[1005][1005],h,w,n;
pair<int,int>p;
int main(){
while(1){
scanf("%d %d %d",&h,&w,&n);
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
scanf("%d",&num[j][i]);
}
}
int y=1,s=1,cou=0;
while(1){
cou++;
if(num[y][s]){
y++;
num[y][s]=(num[y][s]+1)%2;
p=make_pair(y,s);
break;
}else... | a.cc:2:10: fatal error: iostream.h: No such file or directory
2 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s488456771 | p00464 | C++ | #include <cstdio>
#include <iostream.h>
int num[1005][1005],h,w,n;
pair<int,int>p;
int main(){
while(1){
scanf("%d %d %d",&h,&w,&n);
for(int i=1;i<=h;i++){
for(int j=1;j<=w;j++){
scanf("%d",&num[j][i]);
}
}
int y=1,s=1,cou=0;
while(1){
cou++;
if(num[y][s]){
y++;
num[y][s]=(num[y][s]+1)%2;
p=make_pair(y,s);
}else{
num[y... | a.cc:2:10: fatal error: iostream.h: No such file or directory
2 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s777128670 | p00465 | Java | ### constant
MAX_INT = 1 << 30
### main
loop do
r = gets.strip.to_i
break if r == 0
mlss = []
for k in (0..1)
w, h, ex, ey = gets.strip.split(' ').map{|s| s.to_i}
ex -= 1
ey -= 1
als = h.times.map{gets.strip.split(' ').map{|s| s.to_i}}
mls = h.times.map{w.times.map{MAX_INT}}
visite... | Main.java:1: error: illegal character: '#'
### constant
^
Main.java:1: error: illegal character: '#'
### constant
^
Main.java:1: error: illegal character: '#'
### constant
^
Main.java:3: error: class, interface, enum, or record expected
MAX_INT = 1 << 30
^
Main.java:5: error: illegal character: '#'
### main
^
Main.j... |
s788441291 | p00465 | C | #include<iostream>
#include<cstdio>
#include<queue>
#include<vector>
#include<algorithm>
#include<map>
#include<climits>
using namespace std;
int field[500][500],cost[500][500];
int R,W,H,X,Y;
int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};
struct edge{
int y,x,cost;
edge(int y,int x,int cost) : y(y) , x(x) , cost(cos... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s745176884 | p00465 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> Pint;
typedef pair<ll, int> P;
//typedef tuple<int,int,int> T;
ll INFL = 1000000000000000010;//10^18 = 2^60
int INF = 2147483600;//10^9
ll MOD = 1000000007;
vector<int> dy(4);
vector<int> dx(4);
dy.at(0) = 1;
dy.at(1) = -1;
dx.a... | a.cc:12:1: error: 'dy' does not name a type
12 | dy.at(0) = 1;
| ^~
a.cc:13:1: error: 'dy' does not name a type
13 | dy.at(1) = -1;
| ^~
a.cc:14:1: error: 'dx' does not name a type
14 | dx.at(2) = 1;
| ^~
a.cc:15:1: error: 'dx' does not name a type
15 | dx.at(3) = -1;
| ^~
|
s288232653 | p00465 | C++ | #include<iostream>
#include<queue>
#include<cstring>
#include<map>
#include<vector>
using namespace std;
#define INF (1<<24)
int dy[]={-1,0,1,0};
int dx[]={0,1,0,-1};
struct state {
int y,x,cost;
bool operator < (const state &p)const{
return cost > p.cost;
}
};
int R;
int th,tw,uh,uw,ty,tx,uy,ux;
int t[500... | a.cc: In function 'void solve()':
a.cc:48:3: error: 'sort' was not declared in this scope; did you mean 'short'?
48 | sort(G.begin(),G.end());
| ^~~~
| short
a.cc:49:11: error: 'unique' was not declared in this scope
49 | G.erase(unique(G.begin(),G.end()),G.end());
| ^~~~~~
|
s242719361 | p00465 | C++ | #include<bits/stdc++.h>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int r,w[2],h[2],x[2],y[2],l[2][500][500],temp[500][500]; vector<P> d[2];
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
void search(int n){
for(int i=0;i<500;i++) for(int j=0... | a.cc: In function 'int main()':
a.cc:57:74: error: 'class std::vector<std::pair<int, int> >' has no member named 'pop'
57 | for(int n=0;n<2;n++) for(int i=0;i<d[n].size();i++) d[n].pop();
| ^~~
|
s860838722 | p00465 | C++ | #include <iostream>
#include <queue>
#include <set>
#include <utility>
#include <algorithm>
#include <cstdlib>
#include <vector>
using namespace std;
#define INF 10000000
int ary1[510][510],ary2[510][510];
bool used[510][510];
int main(){
int R,W1,W2,H1,H2,X1,X2,Y1,Y2,imax,imay,imad,res;
priority_queue<pair<int,pair... | a.cc: In function 'int main()':
a.cc:39:17: error: 'memset' was not declared in this scope
39 | memset(used,0,sizeof(used));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <cstdlib>
+... |
s437985332 | p00465 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define mp(x,y,z) make_tuple(x,y,z)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,s... | a.cc:6:9: warning: "mp" redefined
6 | #define mp(x,y,z) make_tuple(x,y,z)
| ^~
a.cc:5:9: note: this is the location of the previous definition
5 | #define mp(x,y) make_pair(x,y)
| ^~
a.cc:33:32: error: macro "mp" requires 3 arguments, but only 2 given
33 | que.push(mp(1,X[i]*W[... |
s310012854 | p00465 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc:19:15: error: 'itelator' in 'class std::map<int, int>' does not name a type
19 | map<int,int>::itelator ite;
| ^~~~~~~~
a.cc: In function 'void solve()':
a.cc:33:4: error: 'que' was not declared in this scope; did you mean 'pque'?
33 | que.push(mp(1,X[i]*W[i]+Y[i]));
| ^~~
... |
s837179527 | p00465 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:33:4: error: 'que' was not declared in this scope; did you mean 'pque'?
33 | que.push(mp(1,X[i]*W[i]+Y[i]));
| ^~~
| pque
a.cc:48:24: error: no match for 'operator+' (operand types are 'std::map<int, int>::iterator' {aka 'std::_Rb_tree<int, std::pair<const ... |
s975269043 | p00465 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:50:32: error: no match for 'operator-' (operand types are 'std::map<int, int>::iterator' {aka 'std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::iterator'} and 'int')
50 | ... |
s128814618 | p00465 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:59:16: error: redeclaration of 'auto i'
59 | FOR(i,2) map[i].clear();
| ^
a.cc:59:7: note: 'int i' previously declared here
59 | FOR(i,2) map[i].clear();
| ^
a.cc:2:26: note: in definition of macro 'FOR'
2 | #define FOR(i,n) for(int i... |
s570150555 | p00465 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:4:15: error: request for member 'push_back' in 'lev.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
4 | #define pb(a) push_back(a)
| ^~... |
s212761640 | p00465 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb push_back
#define mp make_pair
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#define ll long l... | a.cc: In function 'void solve()':
a.cc:4:12: error: request for member 'push_back' in 'lev.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
4 | #define pb push_back
| ^~~~~~~~~
a... |
s487947146 | p00465 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb push_back
#define mp make_pair
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#define ll long l... | a.cc: In function 'void solve()':
a.cc:59:37: error: no match for 'operator-' (operand types are 'int' and 'std::vector<int>')
59 | int ind=lower_bound(ALL(sum[1]),R-sum[0])-sum[1].begin();
| ~^~~~~~~
| | |
| ... |
s471409075 | p00465 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <bitset>
#include <stack>
#include <cstdlib>
#include <complex>
#include ... | a.cc: In function 'int main()':
a.cc:99:17: error: cannot bind non-const lvalue reference of type 'std::vector<std::vector<int> >&' to an rvalue of type 'std::vector<std::vector<int> >'
99 | al.swap(vector<vector<int>>(h2,vector<int>(w2)));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In f... |
s092681502 | p00465 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#define rep(i,s,n) for(int i = (s); (n) > i; i+... | a.cc: In function 'int main()':
a.cc:108:25: error: cannot bind non-const lvalue reference of type 'std::vector<std::vector<int> >&' to an rvalue of type 'std::vector<std::vector<int> >'
108 | al.swap(vector<vector<int>>(h2, vector<int>(w2)));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~... |
s056088919 | p00465 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#define rep(i,s,n) for(int i = (s); (n) > i; i+... | a.cc: In function 'int main()':
a.cc:108:25: error: cannot bind non-const lvalue reference of type 'std::vector<std::vector<int> >&' to an rvalue of type 'std::vector<std::vector<int> >'
108 | al.swap(vector<vector<int>>(h2, vector<int>(w2)));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~... |
s595025130 | p00465 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<functional>
#define int long long
#define p pair<int,int>
#define P pair<int,p>
using namespace std;
int x[4] = { -1,0,0,1 }, y[4] = { 0,-1,1,0 };
int f[500][500];
bool i[500][500];
set<p>l,... | a.cc: In function 'int main()':
a.cc:29:17: error: 'memset' was not declared in this scope
29 | memset(i, true, sizeof(i));
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include<functional>
... |
s706755893 | p00465 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<functional>
#define int long long
#define p pair<int,int>
#define P pair<int,p>
using namespace std;
int x[4] = { -1,0,0,1 }, y[4] = { 0,-1,1,0 };
int f[500][500];
bool i[500][500];
set<p>l,... | a.cc: In function 'int main()':
a.cc:29:17: error: 'memset' was not declared in this scope
29 | memset(i, true, sizeof(i));
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include<functional>
... |
s135274973 | p00465 | C++ | #include <queue>
#include <cstdio>
#pragma warning(disable : 4996)
using namespace std;
struct state {
int sx, sy, cost;
};
bool operator<(const state& s1, const state& s2) {
return s1.cost < s2.cost;
}
int R, H[2], W[2], sx[2], sy[2], a[2][509][509], b[2][250009]; bool vis[509][509];
int dir[] = { 0, 1, 0, -1 };
int... | a.cc: In function 'int main()':
a.cc:40:25: error: 'sort' was not declared in this scope; did you mean 'short'?
40 | sort(b[i], b[i] + H[i] * W[i]);
| ^~~~
| short
|
s870284091 | p00465 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,int> plli;
typedef pair<int,pii> pipii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<pii> vpii;
#define rep(i,n) for ... | a.cc:33:17: error: 'long long int y1' redeclared as different kind of entity
33 | int w1, h1, x1, y1;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/... |
s522948183 | p00465 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,int> plli;
typedef pair<int,pii> pipii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<pii> vpii;
#define rep(i,n) for ... | a.cc:33:17: error: 'long long int y1' redeclared as different kind of entity
33 | int w1, h1, x1, y1;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/... |
s931181881 | p00465 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s233210186 | p00465 | C++ | #include <iostream>
#include <list>
#include <vector>
using namespace std;
const int FIELD_SIZE = 502 * 502; // Ժ̽ß+2·é
const int FIELD_WIDTH = 502;
int field[FIELD_SIZE]; // ìÆpÌæ
typedef struct LevelRoomRelation {
int level, room; // FØx, ®
} LevelRoomRelation;
int fill(int r, int p, lis... | a.cc: In function 'void calculateLevel(int, std::__cxx11::list<LevelRoomRelation>*)':
a.cc:68:9: error: 'memset' was not declared in this scope
68 | memset(field, 0, sizeof(int) * FIELD_SIZE);
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding... |
s318556815 | p00465 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define reps(i,n) for(int i=1;i<=n;i++)
const int INF=1010000000;
int R;
int w[2],h[2],st[2],gl[2];
int masu[2][501][501];
int need[2][25001];
int visit[501][501];
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int glcon... | a.cc: In function 'int main()':
a.cc:82:26: error: 'INT_MAX' was not declared in this scope
82 | int mini=INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include<algorithm>
... |
s878632824 | p00465 | C++ | #include <stdio.h>
#include <queue>
#include <limits.h>
using namespace std;
struct room
{
int level, x, y;
room(int level, int x, int y)
{ this->level = level, this->x = x, this->y = y; }
bool operator < (room rhs) const
{ return this->level > rhs.level; }
};
int map[2][500][500];
bool visit[2][500][500];
int ... | a.cc: In function 'int main()':
a.cc:64:60: error: 'abs' was not declared in this scope; did you mean 'ans'?
64 | if(abs(rx - at.x) + abs(ry - at.y) != 1) continue;
| ^~~
| ... |
s204532832 | p00465 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <bitset>
#include <fstream>
#include <cmath>
#include <ctime>
#include <numeric>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int... | a.cc: In function 'int main()':
a.cc:56:25: error: 'memset' was not declared in this scope
56 | memset(flag, 0, sizeof(flag));
| ^~~~~~
a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
13 | #in... |
s133643321 | p00465 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int,pair<int,int>> PP;
int r,w[2],h[2],x[2],y[2];
long long level[501][501][2];
bool used[501][501][2]={};
long long sparklingdaydream[501][501][2];
long long need[250005][2]={};
long long s[250005]={},d[250005]={};
int main(){
w... | a.cc: In function 'int main()':
a.cc:14:17: error: 'memset' was not declared in this scope
14 | memset(need,0,sizeof(need));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++... |
s777475076 | p00465 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int,pair<int,int>> PP;
int r,w[2],h[2],x[2],y[2];
long long level[501][501][2];
bool used[501][501][2]={};
long long sparklingdaydream[501][501][2];
long long need[250005][2]={};
long long s[250005]={},d[250005]={};
int main(){
w... | a.cc: In function 'int main()':
a.cc:14:17: error: 'memset' was not declared in this scope
14 | memset(need,0,sizeof(need));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++... |
s539871051 | p00465 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int,pair<int,int> > PP;
int r,w[2],h[2],x[2],y[2];
long long level[501][501][2];
bool used[501][501][2]={};
long long sparklingdaydream[501][501][2];
long long need[250005][2]={};
long long s[250005]={},d[250005]={};
int main(){
... | a.cc: In function 'int main()':
a.cc:14:17: error: 'memset' was not declared in this scope
14 | memset(need,0,sizeof(need));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++... |
s722858881 | p00465 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int,pair<int,int> > PP;
int r,w[2],h[2],x[2],y[2];
long long level[501][501][2];
bool used[501][501][2]={};
long long sparklingdaydream[501][501][2];
long long need[250005][2]={};
long long s[250005]={},d[250005]={};
int main(){
... | a.cc: In function 'int main()':
a.cc:14:9: error: 'memset' was not declared in this scope
14 | memset(need,0,sizeof(need) );
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++ |+#include <cst... |
s290920795 | p00465 | C++ | #include <iostream>
#include <list>
#include <map>
#include <cstring>
using namespace std;
const int FIELD_SIZE = 502 * 502; // 逡ェ蜈オ縺ョ縺溘a+2縺吶k
const int FIELD_WIDTH = 502;
int field[FIELD_SIZE]; // 菴懈・ュ逕ィ鬆伜沺
typedef struct LevelRoomRelation {
int level, room; // 隱崎ィシ繝ャ繝吶Ν, 驛ィ螻区焚
} LevelRoomRelation;
int f... | a.cc: In function 'void calculateLevel(int, std::__cxx11::list<LevelRoomRelation>*)':
a.cc:39:24: error: 'w' was not declared in this scope
39 | scanf("%d%d%d%d", &w, &h, &x, &y);
| ^
a.cc:39:28: error: 'h' was not declared in this scope
39 | scanf("%d%d%d%d", &w, &h, &x, &y);... |
s828564817 | p00466 | Java | #include <stdio.h>
int main(void)
{
int goukei, i, n;
scanf("%d", &goukei);
for(i = 0; i < 9; i++){
scanf("%d", &n);
goukei = goukei - n;
}
printf("%d\n", goukei);
return 0;
}
| Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:5: error: class, interface, enum, or record expected
scanf("%d", &goukei);
^
Main.java:6: error: class, interface, enum, or record expected
for(i = 0;... |
s117229057 | p00466 | Java | import java.util.*;
public class Myon {
Myon(){}
public static void main(String[] args)
{
new Myon().run();
}
public void run(){
Scanner cin = new Scanner(System.in);
while(true){
int a = cin.nextInt();
for(int i=0;i<9;i++) a -= cin.nextInt();
System.ou... | Main.java:3: error: class Myon is public, should be declared in a file named Myon.java
public class Myon {
^
1 error
|
s033668127 | p00466 | C | #include<stdio.h>
int main(void)
{
int a,s;
int i,n,x;
while(1){
scanf("%d",&n);
if(n==0){
break;
}
s=0
for(i=0;i<9;i++){
scanf("%d",&a);
s+=a;
}
x=n-s;
}
printf("%d\n",x);
return 0;
}
| main.c: In function 'main':
main.c:11:20: error: expected ';' before 'for'
11 | s=0
| ^
| ;
12 | for(i=0;i<9;i++){
| ~~~
|
s501658819 | p00466 | C | #include<stdio.h>
int main(void)
{
int a,s;
int i,n,x;
while(1){
scanf("%d",&n);
if(n==0){
break;
}
s=0
for(i=0;i<9;i++){
scanf("%d",&a);
s+=a;
}
x=n-s;
printf("%d\n",x);
}
return 0;
}
| main.c: In function 'main':
main.c:11:20: error: expected ';' before 'for'
11 | s=0
| ^
| ;
12 | for(i=0;i<9;i++){
| ~~~
|
s852084893 | p00466 | C | #include<stdio.h>
int main(void)
{
int a,s;
int i,n,x;
while(1){
scanf("%d",&n);
if(n==0){
break;
}
s=0
for(i=0;i<9;i++){
scanf("%d",&a);
s+=a;
}
x=n-s;
printf("%d\n",x);
}
return 0;
}
| main.c: In function 'main':
main.c:11:20: error: expected ';' before 'for'
11 | s=0
| ^
| ;
12 | for(i=0;i<9;i++){
| ~~~
|
s498169902 | p00466 | C | #include<stdio.h>
int main(){
int a[10],i;
scanf("%d",&a[0]);
if(&a[0] =0){
goto exit;
for(i=0;i<9;i++){
scanf("%d",&a[i+1]);
}
printf("%d",a[0]-a[1]-a[2]-a[3]-a[4]-a[5]-a[6]-a[7]-a[8]-a[9]);
exit :
return(0);
} | main.c: In function 'main':
main.c:5:12: error: lvalue required as left operand of assignment
5 | if(&a[0] =0){
| ^
main.c:13:1: error: expected declaration or statement at end of input
13 | }
| ^
|
s896511479 | p00466 | C | 9850
1050
800
420
380
600
820
2400
1800
980 | main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 9850
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.