submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s363566338
p00761
C
#include<stdio.h> #include<stdlib.h> int cmp1(const void *a, const void *b){ return *((char *)a) - *((char *)b); } int cmp2(const void *a, const void *b){ return *((char *)b) - *((char *)a); } int ff(int a,int b){ int m,mm; int i; char s[7]={0}; /* for(i = 5;i >= 0;i--){ s[i] = a%10 + '0'; a /= 10; if(a=...
main.c: In function 'ff': main.c:23:9: error: implicit declaration of function 'srintf'; did you mean 'sprintf'? [-Wimplicit-function-declaration] 23 | srintf(s,"%000000d",a); | ^~~~~~ | sprintf main.c:24:11: error: 'l' undeclared (first use in this function) 24 | s[l] ...
s612486147
p00761
C
#include<stdio.h> #include<stdlib.h> int cmp1(const void *a, const void *b){ return *((char *)a) - *((char *)b); } int cmp2(const void *a, const void *b){ return *((char *)b) - *((char *)a); } int ff(int a,int b){ int m,mm; int i; char s[7]={0}; /* for(i = 5;i >= 0;i--){ s[i] = a%10 + '0'; a /= 10; if(a=...
main.c: In function 'ff': main.c:23:9: error: implicit declaration of function 'srintf'; did you mean 'sprintf'? [-Wimplicit-function-declaration] 23 | srintf(s,"%000000d",a); | ^~~~~~ | sprintf
s908481763
p00761
C
m
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | m | ^
s715428741
p00761
C
#include <stdio.h> #include <stdbool.h> int l; int sr[10]={0}; int min[10]; int mi=0,ma=0,ci=0; int memo[20]; bool ch=0; int main(void){ int i,j,n,k=0; while(1){ scanf("%d %d",&memo[0],&l); if(memo[0]+l==0)break; k=1; while(1){ for(i=0;i<10;i++)sr[i]=0; mi=0; ma=0; ci=0...
main.c:59:1: error: unknown type name 'Compile' 59 | Compile Error Logs: | ^~~~~~~ main.c:59:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Logs' 59 | Compile Error Logs: | ^~~~ main.c:64:6: error: stray '#' in program 64 | Case # Verdict CPU Time Memory ...
s064323976
p00761
C
2012 4 83268 6 1112 4 0 1 99 2 0 0
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 2012 4 | ^~~~
s613658302
p00761
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int N[100],L,f,i,j,t,F[1000000]; int c(const void *a,const void *b) { return f?*(char*)a-*(char*)b:*(char*)b-*(char*)a; } int main() { for(;scanf("%d%d",&N[0],&L),L;) { memset(F,0,sizeof(F)); F[N[0]]=1; for(i=0;;i++) { char m[9]={0},M[9]={0}; itoa...
main.c: In function 'main': main.c:18:25: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration] 18 | itoa(N[i],m,10); | ^~~~
s656594118
p00761
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
s084373326
p00761
C++
#include <algorithm> #include <cstdio> #include <map> #define repeat(i, n) for (int i = 0; (i) < int(n); ++(i)) #define whole(f, x, ...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x) using namespace std; string to_string(int a, int l) { string s; repeat (i, l) { ...
a.cc:8:1: error: 'string' does not name a type; did you mean 'stdin'? 8 | string to_string(int a, int l) { | ^~~~~~ | stdin a.cc:17:17: error: 'string' was not declared in this scope 17 | int from_string(string const & s) { | ^~~~~~ a.cc:4:1: note: 'std::string' is defined in he...
s060196569
p00761
C++
#include <iostream> #include <algorithm> #include <cstring> #include <vector> using namespace std; int main(){ while(1){ char a[20]; int L; cin>>a>>L; if(!L) break; int hist[30], after=0, count=1; int ans1, ans2; hist[0] =atoi(a); while(1){ fill(a+strlen(a), a+L, '0'); vector<int> max(L, 0),...
a.cc: In function 'int main()': a.cc:30:53: error: 'pow' was not declared in this scope 30 | else imax += max[i]*pow(10, i); | ^~~ a.cc:31:48: error: 'pow' was not declared in this scope 31 | ...
s739863563
p00761
C++
#include "pch.h" #include <iostream> #include <algorithm> #include <cstring> #include <vector> using namespace std; int main(){ while(1){ char a[20]; int L; cin>>a>>L; if(!L) break; int hist[30], after=0, count=1; int ans1, ans2; hist[0] =atoi(a); while(1){ fill(a+strlen(a), a+L, '0'); vector...
a.cc:1:10: fatal error: pch.h: No such file or directory 1 | #include "pch.h" | ^~~~~~~ compilation terminated.
s834027347
p00761
C++
#include <iostream> #include <algorithm> #include <cstring> #include <vector> using namespace std; int main(){ while(1){ char a[20]; int L; cin>>a>>L; if(!L) break; int hist[30], after=0, count=1; int ans1, ans2; hist[0] =atoi(a); while(1){ fill(a+strlen(a), a+L, '0'); vector<int> max(L, 0), ...
a.cc: In function 'int main()': a.cc:29:53: error: 'pow' was not declared in this scope 29 | else imax += max[i]*pow(10, i); | ^~~ a.cc:30:48: error: 'pow' was not declared in this scope 30 | ...
s576140883
p00761
C++
#include <iostream> #include <cmath> #include <cstring> #include <algorithm> #include <cstring> #include <vector> using namespace std; int main(){ while(1){ char a[20]; int L; cin>>a>>L; if(!L) break; int hist[30], after=0, count=1; int ans1, ans2; hist[0] =atoi(a); while(1){ fill(a+strlen(a), a...
a.cc: In function 'int main()': a.cc:45:25: error: 'itoa' was not declared in this scope 45 | itoa(after, a, 10); | ^~~~
s822744244
p00761
C++
#include <iostream> #include <cmath> #include <cstring> #include <cstdlib> #include <algorithm> #include <cstring> #include <vector> using namespace std; int main(){ while(1){ char a[20]; int L; cin>>a>>L; if(!L) break; int hist[30], after=0, count=1; int ans1, ans2; hist[0] =atoi(a); while(1){ ...
a.cc: In function 'int main()': a.cc:46:25: error: 'itoa' was not declared in this scope 46 | itoa(after, a, 10); | ^~~~
s395547990
p00761
C++
#include <iostream> #include <cmath> #include <cstring> #include <stdlib.h> #include <algorithm> #include <cstring> #include <vector> using namespace std; int main(){ while(1){ char a[20]; int L; cin>>a>>L; if(!L) break; int hist[30], after=0, count=1; int ans1, ans2; hist[0] =atoi(a); while(1){ ...
a.cc: In function 'int main()': a.cc:46:25: error: 'itoa' was not declared in this scope 46 | itoa(after, a, 10); | ^~~~
s384105146
p00761
C++
#include<iostream> using namespace std; int d(int n,int l); int a[100],ar[10]; bool q; int main(){ int a0,l; while(1){ q=false; cin>>a0>>l; if(a0==0&&l==0)return 0; a[0]=a0; int j=1; while(1){ a[j]=d(a[j-1],l); for(int k=0;k<j;k++){ if(a[k]==a[j]) ...
a.cc: In function 'int d(int, int)': a.cc:35:5: error: 'sort' was not declared in this scope; did you mean 'short'? 35 | sort(ar,ar+l); | ^~~~ | short
s693433931
p00761
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int p(int in) { int ret = 1; for (int i = 0; i < in; ++i) ret *= 10; return ret; } int to10(vector<int>& in) { int ret = 0; for (int i = 0; i < in.size(); ++i) { ret *= 10; ret += in.at(i); } return ret; }...
/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
s558542434
p00761
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int p(int in) { int ret = 1; for (int i = 0; i < in; ++i) ret *= 10; return ret; } int to10(vector<int>& in) { int ret = 0; for (int i = 0; i < in.size(); ++i) { ret *= 10; ret += in.at(i); } return ret; }...
a.cc:71:5: error: redefinition of 'int p(int)' 71 | int p(int in) | ^ a.cc:8:5: note: 'int p(int)' previously defined here 8 | int p(int in) | ^ a.cc:79:5: error: redefinition of 'int to10(std::vector<int>&)' 79 | int to10(vector<int>& in) | ^~~~ a.cc:16:5: note: 'int to10(std::v...
s898412017
p00761
C++
#include <iostream> #include <iomanip> #include <sstream> #include <stdio.h> #include <list> #include <vector> #include <stack> #include <queue> #include <map> #include <set> #include <algorithm> #include <math.h> #include <utility> #include <string> #include <ctype.h> #include <cstring> #include <cstdio> #include <sst...
In file included from /usr/include/c++/14/map:63, from a.cc:9: /usr/include/c++/14/bits/stl_map.h: In instantiation of 'void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = int; _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocato...
s970146238
p00761
C++
#include<iostream> #include<string> #include<vector> #include<map> #include<sstream> #include<functional> using namespace std; string hiku(string a,string b){ stringstream t1,t2,t3; int x=0,y=0,ans=0; t1<<a; t2<<b; t1>>x; t2>>y; ans=x-y; t3<<ans; string tmp=t3.str(); return tmp; } int main(){ string a; in...
a.cc: In function 'int main()': a.cc:34:25: error: 'sort' was not declared in this scope; did you mean 'short'? 34 | sort(a.begin(),a.end()); | ^~~~ | short
s979865367
p00761
C++
#include <iostream> #include <vector> #include <cstdio> #include <stack> using namespace std; typedef vector<int> vi; typedef pair<int,int> pii; typedef long long int ll; #define dump(x) cerr << #x << " = " << (x) << endl #define rep(i,n) for(int i=0;i<(n);i++) #define pb push_back string solve(string s){ sort...
a.cc: In function 'std::string solve(std::string)': a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(s.begin(),s.end()); | ^~~~ | short
s363358554
p00761
C++
#include <cstdio> #include <algorithm> using namespace std; int a, L; int ans_j, ans_ai, ans_i_j; int A[22]; int N[6]; int get_greatest() { sort(&N[0], &N[L]); int r = 0; for (int i = L - 1; i >= 0; i--) { r *= 10; r += N[i]; } //printf("greatest: %d\n", r); return r; } int ...
a.cc: In function 'void solve()': a.cc:44:17: error: 'INT_MAX' was not declared in this scope 44 | int ans_i = 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> +++ |+#include...
s559006299
p00761
C++
#include <iostream> #include <utility> #include <string> #include <vector> #include <map> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); ++i) int main() { int a, L; while(cin >> a >> L, (a|L)) { map<int, int> map; int idx = 0; for(;;) { string str = to_string(a); if( map....
a.cc: In function 'int main()': a.cc:30:25: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | string left( str ); sort(left.begin(), left.end(), greater<char>()); | ^~~~ | short
s828620069
p00761
C++
#include <iostream> #include <utility> #include <string> #include <vector> #include <map> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); ++i) int main() { int a, L; while(cin >> a >> L, (a|L)) { map<int, int> map; int idx = 0; for(;;) { string str = to_string(a); if( map....
a.cc: In function 'int main()': a.cc:30:25: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | string left( str ); sort(left.begin(), left.end(), greater<char>()); | ^~~~ | short
s442739918
p00761
C++
#include <iostream> #include <utility> #include <string> #include <vector> #include <map> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); ++i) int main() { int a, L; while(cin >> a >> L, (a|L)) { map<int, int> m; int idx = 0; for(;;) { string str = to_string(a); if( m.find...
a.cc: In function 'int main()': a.cc:30:25: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | string left( str ); sort(left.begin(), left.end(), greater<char>()); | ^~~~ | short
s540188513
p00761
C++
#include <iostream> #include <utility> #include <string> #include <vector> #include <map> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); ++i) int main() { int a, L; while(cin >> a >> L, (a|L)) { map<int, int> m; int idx = 0; for(;;) { string str = to_string(a); if( m.find...
a.cc: In function 'int main()': a.cc:30:25: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | string left( str ); sort(left.begin(), left.end(), greater<char>()); | ^~~~ | short
s114110322
p00761
C++
#include <iostream> #include <utility> #include <string> #include <vector> #include <map> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); ++i) int main() { int a, L; while(cin >> a >> L, (a|L)) { map<int, int> m; int idx = 0; for(;;) { string str = to_string(a); if( m.find...
a.cc: In function 'int main()': a.cc:30:25: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | string left( str ); sort(left.begin(), left.end(), greater<char>()); | ^~~~ | short
s279371221
p00761
C++
#include<iostream> #include<vector> using namespace std; vector<int>cur; vector<int>his; int main() { int a,l,count,now; while(true){ count=0; his.clear(); cin>>a>>l; his.push_back(a); if(a==0&&l==0) break; while(true){ count++; ...
a.cc: In function 'int main()': a.cc:28:13: error: 'sort' was not declared in this scope; did you mean 'short'? 28 | sort(cur.begin(),cur.end()); | ^~~~ | short a.cc:38:33: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iter...
s387428671
p00761
C++
#include <iostream> #include <algorithm> #include <vector> int memo[1000000]; using namespace std; int next(int a,int keta){ int tbl[6]={}; int p = 0; while(a){ tbl[p++] = a%10; a/=10; } int Max = 0, Min = 0; sort(tbl,tbl+keta); int pow10 = 1; for(int i=0;i<keta;++i){ Max+=pow10*tbl[i]; ...
a.cc: In function 'int main()': a.cc:29:5: error: 'memset' was not declared in this scope 29 | memset(memo,-1,sizeof(memo)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#include <cstring> ...
s231808223
p00761
C++
#include<iostream> #include<string> #include<stdlib> using namespace std; void toStr(int n, int L,char c[]) { int i = 0; for (i = 0; i < L; i++) { c[L - 1 - i] = n % 10 + '0'; n /= 10; } return; } int toNum(char c[]) { int index = 0; while (c[index] != '\0') { } return 0; } int getMax(char c[],int ...
a.cc:3:9: fatal error: stdlib: No such file or directory 3 | #include<stdlib> | ^~~~~~~~ compilation terminated.
s504751345
p00761
C++
#include<iostream> #include<string> using namespace std; int main(){ string a[32],b,c,z; int L; while(cin>>a[0]>>L){ for(int j=0;j<L-a[0].size();j++)z+='0'; if(L==0)break; a[0]=z+a[0]; int i=0,k=1; while(k){ b=a[i]; sort(b.begin(),b.end()); c=b; reverse(c.begin(),c.end(...
a.cc: In function 'int main()': a.cc:14:7: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(b.begin(),b.end()); | ^~~~ | short a.cc:16:7: error: 'reverse' was not declared in this scope 16 | reverse(c.begin(),c.end()); | ^~~~~~~
s920594089
p00761
C++
#include<iostream> #include<string> using namespace std; int main(){ string a[32],b,c,z; int L; while(cin>>a[0]>>L){ for(int j=0;j<L-a[0].size();j++)z+='0'; if(L==0)break; a[0]=z+a[0]; int i=0,k=1; while(k){ b=a[i]; sort(b.begin(),b.end()); c=b; reverse(c.begin(),c.end(...
a.cc: In function 'int main()': a.cc:14:7: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(b.begin(),b.end()); | ^~~~ | short a.cc:16:7: error: 'reverse' was not declared in this scope 16 | reverse(c.begin(),c.end()); | ^~~~~~~
s336315426
p00761
C++
#include<iostream> #include<string> using namespace std; int main(){ string a[32],b,c,z; int L; while(cin>>a[0]>>L){ if(L==0)break; for(int j=0;j<L-a[0].size();j++)z+='0'; a[0]=z+a[0]; int i=0,k=1; while(k){ b=a[i]; sort(b.begin(),b.end()); c=b; reverse(c.begin(),c.end(...
a.cc: In function 'int main()': a.cc:14:7: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(b.begin(),b.end()); | ^~~~ | short a.cc:16:7: error: 'reverse' was not declared in this scope 16 | reverse(c.begin(),c.end()); | ^~~~~~~
s955440155
p00761
C++
#include<iostream> using namespace std; int main(){ while(1){ char h[7]={}; int L,min,max,f=0,sum[100000],i; cin>>h>>L; if(L==0) break; for(int i=strlen(h);i<L;i++) h[i]='0'; sum[0]=atoi(h); i=1; while(1){ if(f==1) break; sort(h,h+L); min=atoi(h); reverse(h,h+L); max=atoi(h...
a.cc: In function 'int main()': a.cc:11:13: error: 'strlen' was not declared in this scope 11 | for(int i=strlen(h);i<L;i++) h[i]='0'; | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#in...
s241962414
p00761
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; int main() { while (1) { int a, L; cin >> a >> L; vector<int>ints; int ansnum; int latplace; int earplace; while (1) { vector<int>perm(L); st = to_string(a); while (st.size() < L)st = "0" + st; ...
a.cc: In function 'int main()': a.cc:17:25: error: 'st' was not declared in this scope; did you mean 'std'? 17 | st = to_string(a); | ^~ | std
s003189940
p00761
C++
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...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.InputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodu...
s518023493
p00761
C++
#include <iostream> #include <stdio.h> #include <algorithm> #pragma warning(disable:4996) using namespace std; int main() { int InpNum = 0, l = 0, j = 0; while(cin >> InpNum >> l) { int cnt = 0; int TempNum1[10] = { 0 }; int TempNum3[25] = { 0 }; int n = 0, tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0; ...
a.cc: In function 'int main()': a.cc:66:82: error: 'pow' was not declared in this scope 66 | TempNum3[j] = TempNum3[j] + TempNum2[i+1] * (int)pow(10.0, l - i - 1); | ^~~
s733234527
p00761
C++
#include <iostream> #include <stdio.h> #include <algorithm> using namespace std; int main() { int InpNum = 0, l = 0, j = 0; while(cin >> InpNum >> l) { int cnt = 0; int TempNum1[10] = { 0 }; int TempNum3[25] = { 0 }; int n = 0, tmp1 = 0, tmp2 = 0, tmp3 = 0, tmp4 = 0; if(InpNum == 0 && l ==0){break...
a.cc: In function 'int main()': a.cc:64:82: error: 'pow' was not declared in this scope 64 | TempNum3[j] = TempNum3[j] + TempNum2[i+1] * (int)pow(10.0, l - i - 1); | ^~~
s294447845
p00761
C++
#include <iostream> using namespace std; int main(){ int n,l,i,j,c,a,b,o; int k[6]={}; int bu[30]={}; cin >> n >> l; while(l!=0){ c=1; bu[0]=n; int f=0; while(f==0){ j=1; for(i=0;i<l-1;i++) j*=10; for(i=0;i<l;i++){ k[i]=bu[c-1]%(j*10)/j; j/=10; } sort(k,k+l); ...
a.cc: In function 'int main()': a.cc:19:7: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(k,k+l); | ^~~~ | short
s725053586
p00761
C++
#include <iostream> #include <algorhythm> using namespace std; int main(){ int n,l,i,j,c,a,b,o; int k[6]={}; int bu[30]={}; cin >> n >> l; while(l!=0){ c=1; bu[0]=n; int f=0; while(f==0){ j=1; for(i=0;i<l-1;i++) j*=10; for(i=0;i<l;i++){ k[i]=bu[c-1]%(j*10)/j; j/=10; }...
a.cc:2:10: fatal error: algorhythm: No such file or directory 2 | #include <algorhythm> | ^~~~~~~~~~~~ compilation terminated.
s596973656
p00761
C++
#include <iostream> #include <iostream> #include <string> #include <algorithm> using namespace std; int main(int argc, char *argv[]) { int a, l, cur, i; string str; bool flg; while (cin >> a >> l, a | l) { cur = 0; int res[20]; flg = true; while (flg) { res[c...
a.cc:36:8: error: stray '@' in program 36 | taguchi@kMacBo | ^ a.cc:36:1: error: 'taguchi' does not name a type 36 | taguchi@kMacBo | ^~~~~~~
s023018870
p00761
C++
#include <bits/stdc++.h> using namespace std ; #define pb(n) push_back(n) #define fi first #define se second #define all(r) (r).begin(),(r).end() #define vmax(ary) *max_element(all(ary)) #define vmin(ary) *min_element(all(ary)) #define debug(x) cout<<#x<<": "<<x<<endl #define fcout(n) cout<<fixed<<setprecision((n)) #d...
a.cc: In function 'int main()': a.cc:64:23: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>' and 'const char [2]') 64 | while(cin >> s >> s != "0" && l && l){ | ~~~~~~~~~~~~~ ^~ ~~~ | | | | | const char [2] ...
s628986864
p00761
C++
#include <iostream> #include <vector> #include <map> #define rep(a, b, c) for (long a = b; a < c; a++) using namespace std; int A, L; int convert(vector<int> list) { int rtn = 0; rep(i, 0, list.size()) { rtn *= 10; rtn += list[list.size() - i - 1]; } return rtn; } vector<int> convert...
a.cc: In function 'int makeMax(std::vector<int>)': a.cc:29:5: error: 'sort' was not declared in this scope; did you mean 'short'? 29 | sort(list.begin(), list.end()); | ^~~~ | short a.cc: In function 'int makeMin(std::vector<int>)': a.cc:34:5: error: 'sort' was not declared in this scope; did...
s436933583
p00761
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; int vtoi(vector<int> v){ int n=0; for(int i=0;i<v.size();++i){ n += v[i] * pow(10, i); } return n; } vector<int> itov(int n, int L){ vector<int> v; for(int i=0;i<L;++i){ v.push_back(n%10); n = n...
a.cc: In function 'int main()': a.cc:35:13: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 35 | sort(v.begin(), v.end(), greater<int>()); | ^~~~ | sqrt
s861261588
p00761
C++
include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <math.h> #include <string> #include <string.h> #include <stack> #include <queue> #include <vector> #include <utility> #include <set> #include <map> #include <stdlib.h> using namespace std; #define ll long long #define ld long double #...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __...
s308680647
p00761
C++
/* * B.cpp * * Created on: 2017/06/18 * Author: aihara */ #include<bits/stdc++.h> #define MYDEBUG #ifdef MYDBUG #define dbp(x) cout<<#x<<": "<<x<<endl #else #define dbp(x) #endif #define ll long long #define rep(i,from,to) for(int i=from; i<to; ++i) #define REP(i,from,to) for(int i=from; i<=to; ++i) using ...
a.cc: In function 'void solve()': a.cc:46:25: error: 'itoa' was not declared in this scope 46 | itoa(diff, nextS, 10); | ^~~~
s692907179
p00761
C++
/* * B.cpp * * Created on: 2017/06/18 * Author: aihara */ #include<bits/stdc++.h> #define MYDEBUG #ifdef MYDBUG #define dbp(x) cout<<#x<<": "<<x<<endl #else #define dbp(x) #endif #define ll long long #define rep(i,from,to) for(int i=from; i<to; ++i) #define REP(i,from,to) for(int i=from; i<=to; ++i) using ...
a.cc: In function 'void solve()': a.cc:46:25: error: 'itoa' was not declared in this scope 46 | itoa(diff, nextS, 10); | ^~~~
s560834777
p00761
C++
#include<iostream> #include<algorithm> #include<functional> #include<string> #include<string.h> #include<vector> #include<cstdio> using namespace std; template < typename T > std::string to_string(const T& n) { std::ostringstream stm; stm << n; return stm.str(); } int main() { while (1) { int l; string str; ...
a.cc: In function 'std::string to_string(const T&)': a.cc:13:28: error: 'stm' has incomplete type 13 | std::ostringstream stm; | ^~~ In file included from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/...
s934135403
p00761
C++
#include<iostream> #include<vector> using namespace std; int vals[6]; int a0, l; int update(int ai) { for (int i = 0; i < l; ++i) { vals[i] = ai % 10; ai /= 10; } sort(vals, vals + l); int max = 0; int min = 0; int d = 1; for (int i = 0; i < l; ++i) { max += d * va...
a.cc: In function 'int update(int)': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(vals, vals + l); | ^~~~ | short
s304208285
p00761
C++
#include<iostream> #include <vector> #include <algorithm> #include <stack> #include <list> #include <map> #include <cmath> #include <utility> #include <cstdlib> #include <cstring> using namespace std; void solve(int a, int L) { vector<int> d; d.push_back(a); for(int i = 1; ; i++) { char tmp[7]; int size = s...
a.cc: In function 'void solve(int, int)': a.cc:21:35: error: 'itoa' was not declared in this scope 21 | int size = strlen(itoa(a, tmp, 10)); | ^~~~
s241550117
p00761
C++
#include<iostream> #include <vector> #include <algorithm> #include <stack> #include <list> #include <map> #include <cmath> #include <utility> #include <cstdlib> #include <cstring> #include <cstdio> using namespace std; void solve(int a, int L) { vector<int> d; d.push_back(a); for(int i = 1; ; i++) { char tmp[7...
a.cc: In function 'void solve(int, int)': a.cc:22:35: error: 'itoa' was not declared in this scope 22 | int size = strlen(itoa(a, tmp, 10)); | ^~~~
s400083165
p00761
C++
#include<iostream> #include <vector> #include <algorithm> #include <stack> #include <list> #include <map> #include <cmath> #include <utility> #include <cstdlib> #include <cstring> #include <cstdio> #include <stdlib.h> using namespace std; void solve(int a, int L) { vector<int> d; d.push_back(a); for(int i = 1; ;...
a.cc: In function 'void solve(int, int)': a.cc:23:35: error: 'itoa' was not declared in this scope 23 | int size = strlen(itoa(a, tmp, 10)); | ^~~~
s104205161
p00761
C++
#include<iostream> using namespace std; int b[100000]; int change(int x,int y) { int f=x,k=0; int a[6],q=1,flag; for(int i=1;i<y;i++) q*=10; for(int i=q;i>0;i=i/10){a[k]=f/i;k++;f=f%i;} for(int i=0;i<y;i++) for(int j=i+1;j<y;j++) { if(a[i]<a[j]){flag=a[i];a[i]=a[j];a[j]=flag;} } int ma...
a.cc: In function 'int main()': a.cc:32:4: error: 'memset' was not declared in this scope 32 | memset(b,-1,sizeof(b)); | ^~~~~~ 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 | ...
s201395793
p00761
C++
#include<iostream> #include<string> #include<map> #include<set> using namespace std; void simulate(string s, int l){ string L, S; set<string> M; map<string, int> I; int b = 1; while( s.size() < l ) s = "0" + s; for ( int i = 0; i < l-1; i++ ) b *= 10; for ( int cur = 0; ; cur++ ){ M.insert(s); ...
a.cc: In function 'void simulate(std::string, int)': a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(L.begin(), L.end(), greater<char>()); | ^~~~ | short a.cc: At global scope: a.cc:33:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wr...
s835359370
p00761
C++
//============================================================================ // Name : AOJ1180.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <...
a.cc: In function 'int main()': a.cc:67:9: error: 'scanf' was not declared in this scope 67 | scanf("%d %d", &inp, &L); | ^~~~~ a.cc:96:17: error: 'printf' was not declared in this scope 96 | printf("%d ", j); | ^~~~~~ a.cc:10:1: note: 'printf' is define...
s408655702
p00761
C++
#include <iostream> #include <sstream> #include <map> #include <algorithm> using namespace std; int toInt(const string &s) { istringstream is(s); int N; is >> N; return N; } string toString(int num, int L) { int len = log10(num) + 1; ostringstream os; for(int i = 0; i < L - len; i++) os << "0"; os << num; r...
a.cc: In function 'std::string toString(int, int)': a.cc:14:19: error: 'log10' was not declared in this scope 14 | int len = log10(num) + 1; | ^~~~~
s767772304
p00761
C++
#include <iostream> #include <cstdio> using namespace std; const int MAX = 1000000; int a0, L; int x[6]; void solve() { int data[MAX] = {0}; int i=0, a=a0; while (data[a] == 0) { data[a] = i; for (int j=0; j<L; j++) { x[j] = a%10; a/=10; } sort(x, x+L); int max=0, min=0, c=1; for (int j=0; j<L; j+...
a.cc: In function 'void solve()': a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(x, x+L); | ^~~~ | short
s161421286
p00761
C++
while true a = [] a[0], l = gets.split.map(&:to_i) break if l == 0 a[0] = "%0#{l}d" % a[0] (1..25).each do |i| a[i] = "%0#{l}d" % (a[i-1].split(//).sort.reverse.join.to_i - a[i-1].split(//).sort.join.to_i) if a.index(a[i]) < i puts "#{a.index(a[i])} #{a[i]} #{i - a.index(a[i])}" break e...
a.cc:6:4: error: too many decimal points in number 6 | (1..25).each do |i| | ^~~~~ a.cc:1:1: error: expected unqualified-id before 'while' 1 | while true | ^~~~~
s664868499
p00761
C++
#include <iostream> #include <vector> #include <math.h> using namespace std; int main(){ int L, b; while( 1 ){ vector<int> a; cin >> b >> L; a.push_back(b); if( a[0] == 0 && L == 0 ) break; int i = 0; while( i < 20 ){ vector<int> rank; int max = 0, min = 0; int number = a[i]; cout << number <<...
a.cc: In function 'int main()': a.cc:22:25: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 22 | sort( rank.begin(), rank.end() ); | ^~~~ | sqrt
s589878313
p00761
C++
#include <iostream> #include <vector> #include <math.h> using namespace std; int main(){ int L, b; while( 1 ){ vector<int> a; cin >> b >> L; a.push_back(b); if( a[0] == 0 && L == 0 ) break; int i = 0; while( i < 20 ){ vector<int> rank; int max = 0, min = 0; int number = a[i]; cout << number <<...
a.cc: In function 'int main()': a.cc:22:25: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 22 | sort( rank.begin(), rank.end() ); | ^~~~ | sqrt
s911589097
p00761
C++
} sa = 100; tmp =0; for(j = 0; j <= 19 ;j++){ if(tmp ==1) break; for(i = j+1;i <= 20 ;i++){ if(a[j] == a[i]){ tmp = 1; sa = i-j; ansi = i; ansj = j; break; } } } cout << j-1 << " " << a[ansj] << " " << i-j+1 << endl; } return 0; }
a.cc:1:5: error: expected declaration before '}' token 1 | } | ^ a.cc:5:5: error: 'sa' does not name a type 5 | sa = 100; | ^~ a.cc:6:5: error: 'tmp' does not name a type 6 | tmp =0; | ^~~ a.cc:7:5: error: expected unqualified-id before 'for' 7 | for(j = 0; ...
s776277146
p00761
C++
#include <map> #include <algorithm> #include <functional> #include <sstream> using namespace std; int l; string exchange(const string s) { stringstream s1, s2, ret; string tmp; int a, b; tmp = s; sort(tmp.begin(), tmp.end()); s1 << tmp; reverse(tmp.begin(), tmp.end()); s2 << tmp; ...
a.cc: In function 'int main()': a.cc:34:12: error: 'cin' was not declared in this scope 34 | while (cin >> s >> l, s != "0" || l) { | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include <sstream> +++ |+#inc...
s721718461
p00761
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cstdio> #include <queue> #include <stack> #include <map> #include <cstdlib> #define rep(i, n) for(int i = 0; i < n; i++) #define FOR(i, a, b) for(int i = a; i < b; i++) #define all(v) (v).begin(), (v).end() #define MP make_pair usi...
a.cc: In function 'int main()': a.cc:70:17: error: 'itoa' was not declared in this scope 70 | itoa(a, buf, 10); | ^~~~
s936270423
p00761
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cstdio> #include <queue> #include <stack> #include <map> #include <stdlib.h> #define rep(i, n) for(int i = 0; i < n; i++) #define FOR(i, a, b) for(int i = a; i < b; i++) #define all(v) (v).begin(), (v).end() #define MP make_pair us...
a.cc: In function 'int main()': a.cc:70:17: error: 'itoa' was not declared in this scope 70 | itoa(a, buf, 10); | ^~~~
s568247762
p00761
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cstdio> #include <queue> #include <stack> #include <map> #include <cstdlib> #define rep(i, n) for(int i = 0; i < n; i++) #define FOR(i, a, b) for(int i = a; i < b; i++) #define all(v) (v).begin(), (v).end() #define MP make_pair usi...
a.cc: In function 'int main()': a.cc:70:17: error: 'itoa' was not declared in this scope 70 | itoa(a, buf, 10); | ^~~~ a.cc:82:70: error: expected ';' before ')' token 82 | sprintf(buf, "%d", t.c_str())-atoi(s.c_str())); | ...
s606875387
p00761
C++
#include <stdio.h> #include <stdlib.h> #include <algorithm> #include <functional> using namespace std; //FILE *in = freopen("input.txt", "r", stdin); int n, m; char data[30][10]; char format[10]; void input() { sprintf(format, "%%0%dd", m); sprintf(data[0], format, n); strcpy(data[1], data[0]); } void process()...
a.cc: In function 'void input()': a.cc:16:17: error: reference to 'data' is ambiguous 16 | sprintf(data[0], format, n); | ^~~~ In file included from /usr/include/c++/14/unordered_map:42, from /usr/include/c++/14/functional:63, from a.cc:4: /usr/include/...
s089212373
p00761
C++
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <algorithm> #include <functional> using namespace std; char a[8]; int L; vector<int> appered; void init() { appered.clear(); } bool input() { scanf("%s %d", a, &L); if(!atoi(a) && !L) return false; return true; } void solve() ...
a.cc: In function 'void solve()': a.cc:27:21: error: 'strlen' was not declared in this scope 27 | for(int i = strlen(a); i < L; i++) | ^~~~~~ a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <function...
s333401096
p00761
C++
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <map> #include <string> using namespace std; const static int L_MAX = 7; string rmn_toString( int n, int l ) { ostringstream oss; oss << n; string s = oss.str(); for( int i = s.size(); i < l; i++ ) { s = "0" + s; } r...
a.cc: In function 'int main()': a.cc:47:7: error: 'sort' was not declared in this scope; did you mean 'short'? 47 | sort( as.begin(), as.end() ); | ^~~~ | short a.cc:50:7: error: 'reverse' was not declared in this scope 50 | reverse( asi.begin(), asi.end() ); | ^~~~...
s317136340
p00761
C++
#include <iostream> #include <sstream> #include <string> #include <vector> #include <functional> using namespace std; inline int toInt(std::string s) {int v; std::istringstream sin(s);sin>>v;return v;} template<class T> inline std::string toString(T x) {std::ostringstream sout;sout<<x;return sout.str();} int main(in...
a.cc: In function 'int main(int, const char**)': a.cc:35:25: error: 'sort' was not declared in this scope; did you mean 'short'? 35 | sort(s.begin(), s.end()); | ^~~~ | short a.cc:41:32: error: no matching function for call to 'find(...
s649675202
p00761
C++
#include<iostream> #include<vector> using namespace std; int pow(int x,int y){ if(y==0) return 1; return pow(x,y-1)*x; } int make_max(int x,int y){ int keta=pow(10,y-1); int ans=0; for(int i=9;i>=0;i--){ for(int j=0;j<=y;j++){ if((x/pow(10,j))%10==i){ ans+=i*keta; keta/=10; } } } return a...
a.cc: In function 'int main()': a.cc:60:32: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 60 | if(find(data.begin(),data.end(),x)!=data.end()){ | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included fr...
s084397211
p00761
C++
#include<iostream> #include<strstream> #include<utility> #include<cstdio> #include<vector> #include<cmath> #include<climits> #include<map> #include<string> #include<sstream> using namespace std; #define mp make_pair #define rep(i,n) for( int i = 0; i < n; i++ ) typedef vector<int,int> V; typedef long long int ll; i...
In file included from /usr/include/c++/14/backward/strstream:50, from a.cc:2: /usr/include/c++/14/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated...
s384479641
p00761
C++
#include <iostream> #include <string> #include <sstream> #include <vector> #include <cstdlib> #include <functional> using namespace std; string IntToString(int number) { stringstream ss; ss << number; return ss.str(); } int main(){ int n, m; while(cin >> n >> m, n+m){ vector<int> nums, nu...
a.cc: In function 'int main()': a.cc:25:13: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(s.begin(), s.end()); | ^~~~ | short a.cc:31:16: error: 'binary_search' was not declared in this scope 31 | if(binary_search(nums.beg...
s368739351
p00761
C++
#include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <queue> #include <string> #include <complex> #include <stack> #include <set> #include <map> # #define REP(i,n) for (int i = 0; i < (n); i...
a.cc: In function 'void solve()': a.cc:99:38: error: no matching function for call to 'write(long int&, int&, long int)' 99 | write(j, n, i - j); | ~~~~~^~~~~~~~~~~~~ a.cc:40:25: note: candidate: 'template<class T> void write(const T&)' 40 | te...
s493910756
p00761
C++
ahogehoge
a.cc:1:1: error: 'ahogehoge' does not name a type 1 | ahogehoge | ^~~~~~~~~
s955739031
p00762
Java
import java.util.Scanner; class Main { public static void main(String args[]){ Scanner scan = new Scanner(System.in); int n; int[][][] ans; int t, f; int posX, posY, minX, maxX, minY, maxY, move, max; int[] xi = {1, 2, 3, 4, 5, 6}; while(true) { n = scan.nextInt(); if(n == 0)break; m...
Main.java:164: error: class Dice is public, should be declared in a file named Dice.java public class Dice { ^ 1 error
s935259884
p00762
Java
import java.util.Scanner; public class Main { public static void main(String args[]){ Scanner scan = new Scanner(System.in); int n; int[][][] ans; int t, f; int posX, posY, minX, maxX, minY, maxY, move, max; int[] xi = {1, 2, 3, 4, 5, 6}; while(true) { n = scan.nextInt(); if(n == 0)break...
Main.java:164: error: class Dice is public, should be declared in a file named Dice.java public class Dice { ^ 1 error
s937262644
p00762
Java
import java.util.Scanner; class Main { public static void main(String args[]){ Scanner scan = new Scanner(System.in); int n; int[][][] ans; int t, f; int posX, posY, minX, maxX, minY, maxY, move, max; int[] xi = {1, 2, 3, 4, 5, 6}; while(true) { n = scan.nextInt(); if(n == 0)break; m...
Main.java:50: error: variable f might not have been initialized while(xi[1] != f) { ^ 1 error
s363636247
p00762
C
#include<stdio.h> void swap(int *a, int *b){ *a ^= *b; *b ^= *a; *a ^= *b; } typedef struct{ int value; int height; }DATA; void DATAinit(DATA *d){ d->value=0; d->height=0; } // サイコロの構造体 enum Direction{TOP,WEST,SOUTH,EAST,NORTH,BOTTOM,CLOCKWISE,COUNTER}; typedef struct{ int top,south,east,north,west...
main.c: In function 'main': main.c:128:5: error: unknown type name 'bool' 128 | bool stop; | ^~~~ 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 | main.c:138:14: error: '...
s899412671
p00762
C++
//////////////////////////////////////// /// tu3 pro-con template /// //////////////////////////////////////// #include <cassert> #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #incl...
a.cc:133:19: error: declaration of template parameter 'T' shadows template parameter 133 | template <typename T> | ^~~~~~~~ a.cc:108:10: note: template parameter 'T' declared here 108 | template<class T> | ^~~~~ a.cc: In function 'void solve()': a.cc:162:38: error: can...
s869794679
p00762
C++
//////////////////////////////////////// /// tu3 pro-con template /// //////////////////////////////////////// #include <cassert> #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #incl...
a.cc:133:19: error: declaration of template parameter 'T' shadows template parameter 133 | template <typename T> | ^~~~~~~~ a.cc:108:10: note: template parameter 'T' declared here 108 | template<class T> | ^~~~~ a.cc: In instantiation of '_Writer _Writer::operator,(con...
s867668893
p00762
C++
//////////////////////////////////////// /// tu3 pro-con template /// //////////////////////////////////////// #include <cassert> #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #incl...
a.cc: In function 'void solve()': a.cc:162:38: error: cannot bind non-const lvalue reference of type 'solve()::<lambda(XI)>&' to an rvalue of type 'solve()::<lambda(XI)>' 162 | xi.enumerateRotation([&](XI xi){ initTable[xi.top][xi.front] = xi; }); | ^~~~~~~~~...
s646560901
p00762
C++
#include"dice.h" #include<algorithm> #include<map> #include<stack> #include<iostream> #define F(A, B) for(int A=0; A<B; A++) using namespace std; enum DICE{ TOP=0, HEIGHT=1 }; enum DIRECTION{ NORTH=0, EAST, SORTH, WEST }; int moveh(int map[][200][2], int posx, int posy, int dic){ switch(dic){ case(NORTH): ...
a.cc:1:9: fatal error: dice.h: No such file or directory 1 | #include"dice.h" | ^~~~~~~~ compilation terminated.
s651373381
p00762
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.beg...
a.cc: In function 'void mydebug()': a.cc:56:28: error: 'topmap' was not declared in this scope 56 | if(topmap[j][k]!=0) cout << "(" << j << "," << k << ")" <<topmap[j][k] << "(high:" << high[j][k] << ") " ; | ^~~~~~ a.cc:56:111: error: 'high' was not declared ...
s955933405
p00762
C++
#include<iostream> #include<cstdio> #include<vector> using namespace std; int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; typedef pair<int, int> pii; class dice{ public: int surf[6]; int t; int f; dice(){}; vector<int> roll(){ int direct[3] = {0}; vector<int> res; for (int i = 1; ...
a.cc: In function 'int main(int, char**)': a.cc:198:5: error: 'memset' was not declared in this scope 198 | memset(grid, 0, sizeof(grid)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<vector> +++ |+#include...
s380993707
p00762
C++
#include <iostream> using namespace std; int dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 }; int tb[7][5] = { {}, { 3, 5, 4, 2, 6}, { 3, 1, 4, 6, 5}, { 6, 5, 1, 2, 4}, { 1, 5, 6, 2, 3}, { 3, 6, 4, 1, 2}, { 4, 5, 3, 2, 1}, }; int main() { int n; while (cin >> n && n){ const int M = 110; int d[M * ...
a.cc: In function 'int main()': a.cc:28:17: error: 'memset' was not declared in this scope 28 | memset(d, 0, sizeof d); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream> +++ |...
s552153317
p00762
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; typedef unsigned long long ll; int d[24][6]={ //top,down,front,back,left,right {1,6,3,4,2,5}, {1,6,2,5,4,3}, {1,6,5,2,3,4}, {1,6,4,3,5,2}, {4,3,1,6,2,5}, {4,3,5,2,1,6}, {4,3,6,1,5,2}, {4,3,2,5,6,1}, ...
a.cc: In function 'int main()': a.cc:136:9: error: 'memset' was not declared in this scope 136 | memset(cle,0,sizeof(cle)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> +++ |+#include <cs...
s464046583
p00762
C++
#include <iostream> #include<vector> #include<string> #include<algorithm> #include<stdio.h> #include<queue> #include<list> #include<fstream> #define REP(i,n) for(int i = 0; i < n ; ++i) #define LL long long using namespace std; struct D{ int x, y, top, front; }; D dice[7][7][2]; int table[100][300][300]; bool ta...
a.cc: In function 'int main()': a.cc:115:29: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 'close' 115 | cin.close(); | ^~~~~ a.cc:116:30: error: 'std::ostream' {aka 'class std::basic_ostream<char>'} has no member named 'clos...
s520833351
p00762
C++
4 6 4 6 4 6 4 6 4 2 5 3 5 3 8 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 6 4 6 1 5 2 3 5 3 2 4 4 2 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s418484930
p00762
C++
int mp[2][31][31]={}; int sai[7][4]= {{0,0,0,0},{3,5,4,2},{1,4,6,3},{1,2,6,5},{5,6,2,1},{3,6,4,1},{2,4,5,3}}; int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0}; void die(int t,int f,int x,int y){ int i,j,x2,y2,mx=3,f2,t2; mp[1][y][x]++; for(i=0;i<4;i++){ if(sai[t][i]==f){ for(j=i;j<i+4;j++){ int m=j%4,x1=x+dx[j-i...
a.cc: In function 'int main()': a.cc:30:11: error: 'cin' was not declared in this scope 30 | int n;cin>>n;if(n==0)break; | ^~~ a.cc:41:21: error: 'cout' was not declared in this scope 41 | for(i=1;i<6;i++)cout<<c[i]<<" ";cout<<c[6]<<endl; | ^~~~ a.cc:41:37: error:...
s151264927
p00762
C++
int mp[2][31][31]={}; int sai[7][4]= {{0,0,0,0},{3,5,4,2},{1,4,6,3},{1,2,6,5},{5,6,2,1},{3,6,4,1},{2,4,5,3}}; int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0}; void die(int t,int f,int x,int y){ int i,j,x2,y2,mx=3,f2,t2; mp[1][y][x]++; for(i=0;i<4;i++){ if(sai[t][i]==f){ for(j=i;j<i+4;j++){ int m=j%4,x1=x+dx[j-i...
a.cc: In function 'int main()': a.cc:30:11: error: 'cin' was not declared in this scope 30 | int n;cin>>n;if(n==0)break; | ^~~ a.cc:41:21: error: 'cout' was not declared in this scope 41 | for(i=1;i<6;i++)cout<<c[i]<<" ";cout<<c[6]<<endl; | ^~~~ a.cc:41:37: error:...
s776972617
p00762
C++
#include<iostream> using namespace std; int mp[2][31][31]={}; int sai[7][4]= {{0,0,0,0},{3,5,4,2},{1,4,6,3},{1,2,6,5},{5,6,2,1},{3,6,4,1},{2,4,5,3}}; void die(int t,int f,int x,int y){ int i,j,x2,y2,mx=3,f2,t2,dx[4]={0,1,0,-1},dy[4]={-1,0,1,0}; mp[1][y][x]++; for(i=0;i<4;i++){ if(sai[t][i]==f){ for(j=i...
a.cc: In function 'int main()': a.cc:35:9: error: 'i' was not declared in this scope 35 | for(i=0;i<31;i++) | ^ a.cc:36:11: error: 'j' was not declared in this scope 36 | for(j=0;j<31;j++){ | ^ a.cc:37:9: error: 'c' was not declared in this scope 37 | c[mp[0][i][...
s389186683
p00762
C++
// g++ -std=c++11 temp.cpp #include <bits/libstdc++.h> using namespace std; #define For(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define Rep(i,n) For(i,0,n) #define Each(itr,v) for(auto itr:v) #define pb(s) push_back(s) #define mp(a,b) make_pair(a,b) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<<x<...
a.cc:2:10: fatal error: bits/libstdc++.h: No such file or directory 2 | #include <bits/libstdc++.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated.
s825369611
p00762
C++
// g++ -std=c++11 temp.cpp #include <bits/libstdc++.h> using namespace std; #define For(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define Rep(i,n) For(i,0,n) #define Each(itr,v) for(auto itr:v) #define pb(s) push_back(s) #define mp(a,b) make_pair(a,b) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<<x<...
a.cc:2:10: fatal error: bits/libstdc++.h: No such file or directory 2 | #include <bits/libstdc++.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated.
s641833365
p00762
C++
#include<iostream> #include <algorithm> #include <string.h> using namespace std; int side(int up, int front, int n){ int below = 7 - up; int back = 7 - front; int right = 0; int left; int kt = up; int kf, kr; switch(kt){ case 1: kf = 2; kr = 3; break; case 2: kf = 6; kr = 3; break; ca...
a.cc: In function 'int main()': a.cc:75:25: error: expected primary-expression before '}' token 75 | } | ^
s255317125
p00762
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> VI; typedef vector<VI> VVI; int dice[6][4]={{1,2,4,3},{0,3,5,2},{0,1,5,4},{0,4,5,1},{0,2,5,3},{1,3,4,2}}; int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1}; void solve(int x,int y,VVI& v,VVI& w,int top,int face){ ...
a.cc: In function 'int main()': a.cc:53:10: error: 'i' was not declared in this scope 53 | if(i==5)cout<<endl; | ^
s715852326
p00762
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> VI; typedef vector<VI> VVI; int dice[6][4]={{1,2,4,3},{0,3,5,2},{0,1,5,4},{0,4,5,1},{0,2,5,3},{1,3,4,2}}; int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1}; void solve(int x,int y,VVI& v,VVI& w,int top,int face){ ...
a.cc: In function 'int main()': a.cc:53:10: error: 'i' was not declared in this scope 53 | if(i==5)cout<<endl; | ^
s377827108
p00762
C++
#include<iostream> #include<vector> #define r(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; int n,a[222][222],y,x,t,d[6],b[222][222],f; int dx[]={0,1,0,-1}; int dy[]={1,0,-1,0}; vector<P>v; void make_dice(){ d[0]=t; d[1]=f; d[3]=7-f; d[5]=7-t; if(t==1){ if(f==3)d[2]=5,d[4]=2; ...
a.cc: In function 'int main()': a.cc:83:5: error: 'memset' was not declared in this scope 83 | memset(a,0,sizeof(a)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |+#include <cstring> 3 | #...
s780797529
p00762
C++
#include <cstdio> #include <vector> #include <cassert> using namespace std; // Dice library // --------- // | back | // | (5) | // --------+-------+-------+--------+ // | left | top | right | bottom | // | (4) | (1) | (2) | (3) | // --------+-------+-------+--------- // |...
a.cc: In function 'int main()': a.cc:93:9: error: 'memset' was not declared in this scope 93 | memset(board, 0, sizeof(board)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cassert> +++ |+#include...
s943079263
p00762
C++
#include <cstdio> #include <vector> #include <cassert> using namespace std; // Dice library // --------- // | back | // | (5) | // --------+-------+-------+--------+ // | left | top | right | bottom | // | (4) | (1) | (2) | (3) | // --------+-------+-------+--------- // |...
a.cc: In function 'int main()': a.cc:93:9: error: 'memset' was not declared in this scope 93 | memset(board, 0, sizeof(board)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cassert> +++ |+#include...
s258236155
p00762
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <climits> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <...
a.cc: In member function 'int Dice::getFace(int) const': a.cc:102:9: error: 'assert' was not declared in this scope 102 | assert(0); | ^~~~~~ a.cc:28:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 27 | #include <cctype> +++ |+#inc...
s118397995
p00762
C++
#include <iostream> #define N first #define H second #define mk(x, y) make_pair(x, y) using namespace std; typedef pair<int, int> pii; enum drctY { NONE = 0, UP, DOWN, LEFT, RIGHT }; struct _X { int back, front; int left, right; int bottom, top; }; struct _Y { int top, bottom; int front, back; in...
a.cc: In function 'int main()': a.cc:118:17: error: 'memset' was not declared in this scope 118 | memset(fd, 0, sizeof(fd)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +...