submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s285660402
p01131
C++
#include<iostream> #include<string> using namespace std; int main() { int n, p, cnt; string key[] = {"", ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; string str; cin >> n; while (cin >> str) { for (char& c : str) { n = c - '0'; if (n) { cnt++; } else { cout << key[p][(c...
a.cc: In function 'int main()': a.cc:18:65: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s946539090
p01131
C++
#include<iostream> #include<string> using namespace std; int main() { int n, p, cnt; string key[] = {"", ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; string str; cin >> n; while (cin >> str) { for (char& c : str) { n = c - '0'; if (n) { cnt++; } else { cout << key[p][(c...
a.cc: In function 'int main()': a.cc:18:65: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s629442478
p01132
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:24: error: cannot find symbol tot+=a[i]*v[i]; ^ symbol: variable tot location: class Main Main.java:26: error: cannot find symbol tot-=n; ^ symbol: variable tot location: class Main Main.java:28: error: cannot find symbol r[i]=tot/v[i]; ^ symbol: variable tot location: c...
s909275134
p01132
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:34: error: bad operand types for binary operator '-' if(a[i]>r[i]) out.println(v[i]+" "+a[i]-r[i]); ^ first type: String second type: int 1 error
s746696549
p01132
Java
import java.util.Scanner; //Make Purse Light public class AOJ2007 { public static int minCoin; public static int[] coins; public static int[] used; public static int[] ans; public static int returnCoin(int x){ int s = 0; s += x/500; x %= 500; s += x/100; x %= 100; s += x/50; x %= 50; s += x/10; ...
Main.java:4: error: class AOJ2007 is public, should be declared in a file named AOJ2007.java public class AOJ2007 { ^ 1 error
s637644779
p01132
C
#include <stdio.h> int c10, c50, c100, c500; int a10, a50, a100, a500; int b_mon; int a_mon; int price; int main(void) { scanf("%d",&price); while (price) { scanf("%d %d %d %d", &c10, &c50, &c100, &c500); b_mon = c10 * 10 + c50 * 50 + c100 * 100 + c500 * 500; a_mon = b_mon - price; a500 = a_mon / 500; ...
main.c: In function 'main': main.c:28:25: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 28 | print("10 %d\n",c10 - a10); | ^~~~~ | printf
s220238293
p01132
C
v[4]={10,50,100,500},a[4],r[4];main(N,c,m,i){ for(N=0;scanf("%d",&c),c;N++)){ if(N)puts(""); scanf("%d%d%d%d",a,a+1,a+2,a+3); for(m=i=0;i<4;i++)m+=a[i]*v[i]; m-=c; r[3]=m/500,r[2]=m%500/100,r[1]=m%100/50,r[0]=m%50/10; for(i=0;i<4;i++)if((a[i]-=r[i])>0)printf("%d %d\n",v[i],a[i]); } return 0; }
main.c:1:1: warning: data definition has no type or storage class 1 | v[4]={10,50,100,500},a[4],r[4];main(N,c,m,i){ | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'v' [-Wimplicit-int] main.c:1:22: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] 1 | v[4]={10,50,100,500...
s540285100
p01132
C
#include <iostream> #include <algorithm> #include <vector> using namespace std; inline int calc(int a,int b,int c,int d){ return a*10+b*50+c*100+d*500; } int val(int arg, int &x1, int &x2, int &x3 , int &x4){ int ret = 0, tmp; tmp = arg / 500; ret += tmp; x1 = tmp; arg -= tmp * 500; tmp =...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s263166537
p01132
C
#include<stdio.h> #include<alg.h> #define m(a,b) (a<b?a:b) int n[5],i,I,v[5]={0,10,50,100,500},t,u[5]; int main() { for(;scanf("%d",&n[I++%5]),n[0];) if(I%5==0) { for(i=1,t=-n[0];i<5;t+=n[i]*v[i],i++); for(i=5;--i;u[i]=t/v[i],t-=v[i]*u[i]); for(i=1;i<5;i++) n[i]>u[i]?printf("%d %d\n",v[i],n[i]-u[i]):0; ...
main.c:2:9: fatal error: alg.h: No such file or directory 2 | #include<alg.h> | ^~~~~~~ compilation terminated.
s145919852
p01132
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
s801126739
p01132
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
s107104755
p01132
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
s658459942
p01132
C++
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();} template<class T> inline T sqr(T x) {return x*x;} typedef vector<int> vi; typedef vector<vi> vvi; typed...
a.cc:38:12: error: 'int index [4]' redeclared as different kind of entity 38 | int index[4]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, from ...
s545129327
p01132
C++
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();} template<class T> inline T sqr(T x) {return x*x;} typedef vector<int> vi; typedef vector<vi> vvi; typed...
a.cc:38:12: error: 'int index [4]' redeclared as different kind of entity 38 | int index[4]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, from ...
s213455751
p01132
C++
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();} template<class T> inline T sqr(T x) {return x*x;} typedef vector<int> vi; typedef vector<vi> vvi; typed...
a.cc:38:12: error: 'int index [4]' redeclared as different kind of entity 38 | int index[4]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, from ...
s745209738
p01132
C++
#include <cstdio> #include <iostream> #include <cmath> #include <ctype.h> #include <string> #include <sstream> #include <iostream> #include <algorithm> #include <cstdlib> #include <map> #include <queue> #include <utility> #include <vector> using namespace std; int otsuri(); int shiharai, daikin, otsuri_mai; int mon...
a.cc:59:65: error: empty character constant 59 | if(use_mai[i] != 0) cout << money[i] << '' << use_mai[i] << endl; | ^~
s538426450
p01132
C++
#include <bits/stdc++.h> using namespace std; int coin(int s){ return s/500 + (s%500)/100 + (s%100)/50 + (s%50)/10; } int main(){ bool flag = false; int n; while(1){ int a, b, c, d; cin >> n; if(n == 0) break; if(flag) cout << endl; else flag = true; cin >> a >> b >> c >> d; int ans = INT_MAX; int x, y, z, w; for(i...
a.cc: In function 'int main()': a.cc:43:2: error: expected '}' at end of input 43 | } | ^ a.cc:8:11: note: to match this '{' 8 | int main(){ | ^
s300951904
p01132
C++
#include <iostream> #include <vector> using namespace std; vector<int> ret(int v,int n){ n-=v; vector<int> r(4); r[3]=n/500; n%=500; r[2]=n/100; n%=100; r[1]=n/50; n%=50; r[0]=n/10; return r; } int main(){ int n; int t[] = {10,50,100,500}; int t = 0; while(cin>>n,n){ vector<int> c(4); for...
a.cc: In function 'int main()': a.cc:17:7: error: conflicting declaration 'int t' 17 | int t = 0; | ^ a.cc:16:7: note: previous declaration as 'int t [4]' 16 | int t[] = {10,50,100,500}; | ^ a.cc:27:7: error: lvalue required as increment operand 27 | ++t; | ^
s973839838
p01132
C++
#include<map> #include<set> #include<list> #include<cmath> #include<queue> #include<stack> #include<cstdio> #include<string> #include<vector> #include<complex> #include<cstdlib> #include<cstring> #include<climits> #include<numeric> #include<sstream> #include<iostream> #include<algorithm> #include<functional> #define M...
a.cc: In function 'int main()': a.cc:81:26: error: expected ';' before 'goju' 81 | cout << "50 " goju << endl; | ^~~~~ | ;
s877535060
p01132
C++
#include<iostream>using namespace std;int main(){int n,f=0;while(1){int m[501]={};cin>>n;if(n==0) break;cin>>m[10]>>m[50]>>m[100]>>m[500];if(f==1) cout<<endl;n=m[500]*500+m[100]*100+m[50]*50+m[10]*10-n;m[500]-=n/500,n%=500,m[100]-=n/100,n%=100,m[50]-=n/50,n%=50,m[10]-=n/10;for(int i=10;i<=500;i+=10) if(m[i]>0) cout<<i<...
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include<iostream>using namespace std;int main(){int n,f=0;while(1){int m[501]={};cin>>n;if(n==0) break;cin>>m[10]>>m[50]>>m[100]>>m[500];if(f==1) cout<<endl;n=m[500]*500+m[100]*100+m[50]*50+m[10]*10-n;m[500]-=n/500,n%=500,m[100]-=n/100,n%=100,m[50]-...
s746510903
p01132
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m[4],p[4]={10,50,100,500},x[4],y[4],k,i=0,q,j; while(true){ cin>>n;if(!n){break;} if(i){ cout<<endl; } i++; k=0; cin>>m[0]>>m[1]>>m[2]>>m[3]; for(j=3;j>=0;j--){ k+=m[j]*p[j]; } q=k-n; for(int j=3;j>=0;j--){ x[j]=q/p[j]; q-=...
a.cc: In function 'int main()': a.cc:23:61: error: expected ';' before '}' token 23 | if(y[j]){printf("%d %d\n",p[j],y[j])} | ^ | ;
s373410572
p01132
C++
#include<bits/stdc++.h> main(){ int n,m[4],p[4]={10,50,100,500},x[4],y[4],k,i=0,q,j; while(true){ std::cin>>n;if(!n){break;} if(i){cout<<endl;}i++;k=0; std::cin>>m[0]>>m[1]>>m[2]>>m[3]; for(j=3;j>=0;j--){k+=m[j]*p[j];} q=k-n; for(j=3;j>=0;j--){x[j]=q/p[j];q-=x[j]*p[j];y[j]=std::max(0,m[j]-x[j]);} for(j=0;j<4;j++){if(y[...
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | if(i){cout<<endl;}i++;k=0; | ^~~~ | std::cout In file inclu...
s276732812
p01132
C++
#include "bits/stdc++.h" #pragma warning(disable:4996) using namespace std; int coins[4] = { 10,50,100,500 }; int getans(const int money, const vector<int>&nums) { int turi = -money; for (int i = 0; i < 4; ++i) { turi += coins[i] * nums[i]; } if (turi < 0)return 99999999; vector<int>turicoins(4); for (int i...
a.cc: In function 'int main()': a.cc:29:22: error: 'N' was not declared in this scope 29 | if (!N)break; | ^
s118660097
p01132
C++
#include <bits/stdc++.h> #define loop(n, i) for(int i=0;i<n;i++) #define all(v) v.begin(),v.end() #define HERE cout << "HERE: " << __LINE__ << endl; #define INSP(v) cout << v << " at " << __LINE__ << endl; using namespace std; typedef long long ll; int main() { int a; while (cin >> a, a) { int b[4], ...
a.cc: In function 'int main()': a.cc:25:23: error: 'oturi' was not declared in this scope; did you mean 'otsuri'? 25 | int tmp = oturi / kind[i]; | ^~~~~ | otsuri
s122184751
p01132
C++
#include<iostream> using namespace std; int main() { int buy; int have[4],turi[4]; int en[4]={10,50,100,500}; while(cin>>buy) { for(int i=0;i<4;i++){ cin>>have[i]; } for(int i=3,i>=0;i--){ turi[i]=buy/en[i]; if(turi[i]>have[i]){ ...
a.cc: In function 'int main()': a.cc:13:22: error: expected ';' before '>=' token 13 | for(int i=3,i>=0;i--){ | ^~ | ; a.cc:13:22: error: expected primary-expression before '>=' token 13 | for(int i=3,i>=0;i--){ | ^~
s839030618
p01132
C++
#include <iostream> using namespace std; const int c[] = { 10, 50, 100, 500 }; int main(){ int price=0 int n[4]; int kaigyo=0; while( cin>>price ){ for( int i = 0; i < 4; i++ ){ cin >> n[i]; price -= c[i] * n[i]; } price *= -1; for( int i = 3; i >=...
a.cc: In function 'int main()': a.cc:6:5: error: expected ',' or ';' before 'int' 6 | int n[4]; | ^~~ a.cc:10:20: error: 'n' was not declared in this scope 10 | cin >> n[i]; | ^ a.cc:16:17: error: 'n' was not declared in this scope 16 | n[i] -...
s534501286
p01132
C++
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> a(10); vector<int> b(10); for(int i=0;i<10;i++){ cin >> a[i]; } for(int i=0;i<10;i++){ cin >> b[i]; } reverse(a.begin(),a.end()) reverse(b.begin(),b.end()) sort(a.begin(),a.end()); cout << a[0] + a[1] + a[2] << " "; sort(b.begin(),b....
a.cc: In function 'int main()': a.cc:14:35: error: expected ';' before 'reverse' 14 | reverse(a.begin(),a.end()) | ^ | ; 15 | reverse(b.begin(),b.end()) | ~~~~~~~
s951013870
p01132
C++
define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996) #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <string> #include <queue> #include <functional> #include <sstream> #include <cmath> #include <set> #include <map> #include <stack> using namespace std;...
a.cc:1:1: error: 'define' does not name a type 1 | define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996) | ^~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/in...
s073718070
p01132
C++
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <stack> #include <queue> //ranker using namespace std; #define REPS(i, a, n) for (int i = (a); i < (n); ++i) #define R...
a.cc: In function 'void sort2vectors(std::vector<int>&, std::vector<int>&)': a.cc:69:9: error: 'iota' was not declared in this scope 69 | iota(p.begin(), p.end(), 0); | ^~~~ a.cc: In function 'int main()': a.cc:178:8: error: 'i' was not declared in this scope 178 | if(i != 3) cout << endl...
s934073950
p01132
C++
#include <iostream> using namespace std; int main(){ int flg=false; int p=0; while(cin >> p && p>0){ int x[4]={}; cin >> x[0] >> x[1] >> x[2] >> x[3]; int r=(x[0]*10+x[1]*50+x[2]*100+x[3]*500)-p; int y[4]={}; y[3]=r/500; r-=y[3]*500; y[2]=r/100; r-=y[2]*100; y[1]=r/50; r-...
a.cc:20:15: error: empty character constant 20 | cout << '' << endl; | ^~
s374894306
p01132
C++
#include <iostream> using namespace std; int main(){ int flg=false; int p=0; while(cin >> p && p>0){ int x[4]={}; cin >> x[0] >> x[1] >> x[2] >> x[3]; int r=(x[0]*10+x[1]*50+x[2]*100+x[3]*500)-p; int y[4]={}; y[3]=r/500; r-=y[3]*500; y[2]=r/100; r-=y[2]*100; y[1]=r/50; r-...
a.cc:20:15: error: empty character constant 20 | cout << '' << endl; | ^~
s896491887
p01132
C++
#include <iostream> using namespace std; int main(){ int flg=false; int p=0; while(cin >> p && p>0){ int x[4]={}; cin >> x[0] >> x[1] >> x[2] >> x[3]; int r=(x[0]*10+x[1]*50+x[2]*100+x[3]*500)-p; int y[4]={}; y[3]=r/500; r-=y[3]*500; y[2]=r/100; r-=y[2]*100; y[1]=r/50; r...
a.cc:21:15: error: empty character constant 21 | cout << '' << endl; | ^~
s728434607
p01132
C++
#include<iostream> #include<vector> #include<algorithm> #include<cstdio> #include<cstdlib> #include<string> #include<sstream> #include<cmath> #include<numeric> #include<map> #include<stack> #include<queue> #include<list> using namespace std; int inf = 1000000000; int main(void) { int num[4] = {10, 50, 100, 500}; ...
a.cc: In function 'int main()': a.cc:64:19: error: expected ';' before 'return' 64 | javascript:void(0) | ^ | ; 65 | return 0; | ~~~~~~
s971332214
p01132
C++
#include <iostream> using namespace std; int main(){ while(true){ int money[4] = {10, 50, 100, 500}; int n, have[4]; cin >> n; if(n == 0) break; for(int i=0; i<4; i++){ cin >> have[i]; sum += have[i]*money[i]; } sum -= n; ...
a.cc: In function 'int main()': a.cc:13:13: error: 'sum' was not declared in this scope 13 | sum += have[i]*money[i]; | ^~~ a.cc:15:9: error: 'sum' was not declared in this scope 15 | sum -= n; | ^~~
s343159791
p01132
C++
# http://www.deqnotes.net/acmicpc/p0006/ def back_oturigation(fee, coin_values, coin_nums): """ 1. ????????????????????????????????£?????????????????? 2. 1???????????????????????????????????????????????????????????? ???????????§?????????????????????-> ?°????????????????????¶??????????????????? 3...
a.cc:1:3: error: invalid preprocessing directive #http 1 | # http://www.deqnotes.net/acmicpc/p0006/ | ^~~~ a.cc:4:7: warning: missing terminating " character 4 | """ | ^ a.cc:4:7: error: missing terminating " character a.cc:5:40: error: extended character £ is not valid in an identifier ...
s488408128
p01132
C++
#include <iostream> #include <vector> using namespace std; int main() { vector<int> c{10, 50, 100, 500}; vector<int> k; //余った硬貨の枚数 vector<int> num; //所持している硬貨の枚数 int pay; //支払金額 while(1) { cin >> pay; if(pay == 0) break; for(int i = 0; i < 4; i++) { int C; cin >> C; num...
a.cc: In function 'int main()': a.cc:12:3: error: expected initializer before 'while' 12 | while(1) { | ^~~~~
s345494107
p01132
C++
#include <iostream> #include <vector> using namespace std; int main() { int c[4] = {10, 50, 100, 500}; vector<int> num; //所持している硬貨の枚数 int pay; //支払金額 while(1) { cin >> pay; if(pay == 0) break; for(int i = 0; i < 4; i++) { int C; cin >> C; num.push_back(C); } int s...
a.cc:37:25: error: empty character constant 37 | cout << c[i] << '' << num[i] - k[i] << endl; | ^~
s257421379
p01132
C++
#include<iostream> #include<string> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> using namespace std; typedef long long ll; const ll MOD = 1000000007; const ll INF = (ll)1000000007 * 1000000007;...
a.cc:24:1: error: extended character   is not valid in an identifier 24 |     bool g=true; | ^ a.cc:24:1: error: extended character   is not valid in an identifier a.cc:24:1: error: extended character   is not valid in an identifier a.cc:24:1: error: extended character   is not valid in an identifier a.cc: In ...
s841061261
p01132
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
s500545256
p01132
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
s069868561
p01132
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <stack> #include <map> #include <string> #include <algorithm> using namespace std; using namespace std; int main() { int a[4], b[4], int c[4] = {10,50,100,500} int d,e = 0, ju, i; while (cin>>d, d){ if( e ) cout...
a.cc: In function 'int main()': a.cc:15:5: error: expected unqualified-id before 'int' 15 | int c[4] = {10,50,100,500} | ^~~ a.cc:23:27: error: 'c' was not declared in this scope 23 | sum += a[i] * c[i]; | ^ a.cc:27:26: error: 'c' was not declared in this ...
s825292951
p01132
C++
import java.util.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class Main { static Scanner sc = new Scanner(System.in); static int tc; public static void main(String[] args) { tc = 0; while (read()) { solve(); tc++; } } static int M; static int[] nc = new int[4], cv = ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ 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 static java.util.Arrays.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodule...
s170758321
p01132
C++
#include <iostream> using namespace std; int value; int v[4]={500,100,50,10}; int c[4]; //k‰~o‚·Žž‚̍ŏ¬‚Ì–‡” int change(int k){ int res=0; for(int i=0;i<4;i++) { res += k / v[i]; k %= v[i]; } return res; } int mincount,minsum; int r[4]; int t[4]; //a”Ԗڂ̃RƒCƒ“‚ð—p‚¢‚éB—˜—p‚µ‚½–‡”‚ªbB void dfs(int a,in...
a.cc: In function 'int main()': a.cc:46:33: error: 'INT_MAX' was not declared in this scope 46 | mincount=minsum=INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #includ...
s635810026
p01132
C++
v[5];a[]={0,10,50,100,500,v};c,b;main(z){for(;c>4?b>3?c=0,b=-1:++b?z=v[b]+*v%a[b+1]/a[b],z<1||printf("%d %d\n",a[b],z):puts(""):~scanf("%d",v+c)?*v-=v[c]*a[c],++c:0;);}
a.cc:1:1: error: 'v' does not name a type 1 | v[5];a[]={0,10,50,100,500,v};c,b;main(z){for(;c>4?b>3?c=0,b=-1:++b?z=v[b]+*v%a[b+1]/a[b],z<1||printf("%d %d\n",a[b],z):puts(""):~scanf("%d",v+c)?*v-=v[c]*a[c],++c:0;);} | ^ a.cc:1:6: error: 'a' does not name a type 1 | v[5];a[]={0,10,50,100,500,v};c,b;main(z){...
s957026853
p01132
C++
/** * Make Purse Light (Problem B, Practice Contest for Japan Domestic, 2005-06-19) * by Kenji Inoue, 2006-12-22 **/ #include <iostream> using namespace std; int main() { int m, c[4], p[4], r[4]; // money, coins, paid coins, returned coins int d[4] = {10, 50, 100, 500}; bool firstline = true; while (ci...
a.cc: In function 'int main()': a.cc:22:5: error: 'memset' was not declared in this scope 22 | memset(minc, 0, sizeof(minc)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <iostream> +++ |+#include <cstring...
s503138220
p01132
C++
#include <iostream> #include <cstdlib> using namespace std; void otsuri(int seikyu, int *ten, int *fif, int *hund, int *f_hund); int main(void) { int seikyu; int in_ten; int in_fif; int in_hund; int in_f_hund; int out_ten; int out_fif; int out_hund; int out_f_hund; int ten; int fif; int hund; int f_hu...
a.cc: In function 'int main()': a.cc:168:30: error: 'A' was not declared in this scope 168 | cout << endl;A | ^
s591326729
p01132
C++
#include<iostream> #include<cmath> using namespace std; void ans_print(int a[],int b,int c){ int dat[501]={0}; int data[]={10,50,100,500}; for(int i=0;i<c;i++){ if((b&1)==1) dat[a[i]]++; b>>=1; } for(int i=0;i<4;i++){ if(dat[data[i]]>=1){ cout<<data[i]<<" "<<dat[data[i]]<<endl; } } } int mai(int b,...
a.cc: In function 'int main()': a.cc:85:29: error: 'i' was not declared in this scope; did you mean 'ci'? 85 | ans_print(k,i,cnt); | ^ | ci
s775810439
p01133
Java
import java.util.*; public class C2005{ int n; int hx,hy,dx,dy; int[] x,y; double[][] distY; double[] distM; int[] collect; boolean can; void solve(){ Scanner sc = new Scanner(System.in); while(true){ n = sc.nextInt(); hx = sc.nextInt(); hy = sc.nextInt(); dx = ...
Main.java:3: error: class C2005 is public, should be declared in a file named C2005.java public class C2005{ ^ 1 error
s802836506
p01133
Java
import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.ListIterator; import java.util.PriorityQueue; import java.util.Scanner; public class Main { public static final int MAX = 20; public static final double INF = Double.MAX_VALUE; public sta...
Main.java:87: error: cannot find symbol if(time <= cost){ ^ symbol: variable cost location: class Main 1 error
s946332753
p01133
Java
import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import java.util.ListIterator; import java.util.PriorityQueue; import java.util.Scanner; public class Main_TLE { public static final int MAX = 20; public static final double INF = Double.MAX_VALUE; ...
Main.java:8: error: class Main_TLE is public, should be declared in a file named Main_TLE.java public class Main_TLE { ^ 1 error
s217831599
p01133
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #define EPS (1e-10) int used[20]; int cx[20],cy[20]; int dx,dy; int n; int tmp; void dragon(int c,double sum,int hx,int hy) { int i; double r; if(tmp)return; if(c==n){ tmp = 1; return; } for(i=0;i<n;i++){ if(used[i]==0){ r = sum + sqrt((hx-cx[...
main.c: In function 'main': main.c:60:5: error: too few arguments to function 'dragon' 60 | dragon(0.0,hx,hy); | ^~~~~~ main.c:12:6: note: declared here 12 | void dragon(int c,double sum,int hx,int hy) | ^~~~~~
s488360511
p01133
C++
#include <iostream> #include <cmath> #include <vector> #include <tr1/unordered_map> #define fi first #define se second int N; int hx, hy, mx, my; typedef pair<double, double> P; P cs[21]; #define SQ(x) ((x)*(x)) inline double dist(P a, P b) { return sqrt(SQ(a.fi-b.fi) + SQ(a.se-b.se)); } unordered_map<int, double...
a.cc:11:9: error: 'pair' does not name a type 11 | typedef pair<double, double> P; | ^~~~ a.cc:12:1: error: 'P' does not name a type 12 | P cs[21]; | ^ a.cc:15:20: error: 'P' was not declared in this scope 15 | inline double dist(P a, P b) { | ^ a.cc:15:25: error: '...
s126017188
p01133
C++
#include <iostream> #include <cmath> #include <vector> #include <tr1/unordered_map> using namespace std; #define fi first #define se second int N; int hx, hy, mx, my; typedef pair<double, double> P; P cs[21]; #define SQ(x) ((x)*(x)) inline double dist(P a, P b) { return sqrt(SQ(a.fi-b.fi) + SQ(a.se-b.se)); } uno...
a.cc:21:1: error: 'unordered_map' does not name a type 21 | unordered_map<int, double> umap; | ^~~~~~~~~~~~~ a.cc: In function 'bool dfs(int, int, double)': a.cc:30:3: error: 'dp' was not declared in this scope 30 | dp[S] = cost; | ^~ a.cc:40:40: error: expected ';' before 'return' 40 | if(...
s998419704
p01133
C++
#include <iostream> #include <cmath> #include <vector> #include <tr1/unordered_map> using namespace std; #define fi first #define se second int N; int hx, hy, mx, my; typedef pair<double, double> P; P cs[21]; #define SQ(x) ((x)*(x)) inline double dist(P a, P b) { return sqrt(SQ(a.fi-b.fi) + SQ(a.se-b.se)); } uno...
a.cc:21:1: error: 'unordered_map' does not name a type 21 | unordered_map<int, double> umap; | ^~~~~~~~~~~~~ a.cc: In function 'bool dfs(int, int, double)': a.cc:30:3: error: 'umap' was not declared in this scope 30 | umap[S] = cost; | ^~~~
s256622009
p01133
C++
#include <iostream> #include <cmath> #include <vector> #include <tr1/unordered_map.h> using namespace std; #define fi first #define se second int N; int hx, hy, mx, my; typedef pair<double, double> P; P cs[21]; #define SQ(x) ((x)*(x)) inline double dist(P a, P b) { return sqrt(SQ(a.fi-b.fi) + SQ(a.se-b.se)); } u...
In file included from a.cc:4: /usr/include/c++/14/tr1/unordered_map.h:44:24: error: expected template-name before '<' token 44 | : public _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, | ^ /usr/include/c++/14/tr1/unordered_map.h:44:24: error: expected '{' before '<' token /usr/...
s339217406
p01133
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second typedef pair<double, double> P; int N; P h, d, cs[20]; #define SQ(x) ((x)*(x)) inline bool getDist(P a, P b) { return sqrt(SQ(a.fi-b.fi) + SQ(a.se-b.se)); } double dist[22][22]; map<int, double> mp; bool dfs(int S, int now, doubl...
a.cc: In function 'bool solve()': a.cc:53:50: error: 'm' was not declared in this scope 53 | dist[i][N+1] = dist[N+1][i] = getDist(cs[i], m); | ^
s699826333
p01133
C++
#include<cstdio> #include<algorithm> #include<cstring> #include<functional> #include<queue> #include<vector> using namespace std; int n,dx,dy,hx,hy; int cx[20],cy[20]; short dp[1<<20][21]; int main(void){ while(1){ scanf("%d %d %d %d %d",&n,&hx,&hy,&dx,&dy); if(n+hx+hy+dx+dy==0)break; for(int i=0;i<n;i++){ ...
a.cc: In function 'int main()': a.cc:34:68: error: no matching function for call to 'min(short int&, int)' 34 | dp[i|(1<<k)][k]=min(dp[i|(1<<k)][k],dp[i][j]+move); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s511072854
p01133
C++
#include <iostream> #include <cmath> using namespace std; int n,hx,hy,dx,dy; float dist[21][21]; struct Crystal{ int x,y; float dist; bool visited; }; Crystal crystals[21];//[0]???????????????????????????????????? bool rec(int s,float t){ crystals[s].visited=true; for(int i=0;i<n;i++){ i...
a.cc: In function 'int main()': a.cc:42:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 42 | sort(crystals+1,crystals+n+1,[](const Crystal& a, const Crystal& b){return (a.dist==b.dist)?(a.x<b.x):(a.dist)<(b.dist);}); | ^~~~ | sqrt
s582481539
p01133
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cstdio> #include <cmath> #define EPS 1.0e-10 #define MAX_CRYSTAL 32 #define rep(idx, max) for(int idx = 0, idx##Max = max; idx < idx##Max; idx ++) typedef struct _POINT { int x, y; _POINT() {} _POINT(int _x, int _y) : x(_x), y(...
a.cc: In function 'int main(int, char**)': a.cc:79:19: error: '::memset' has not been declared 79 | ::memset(g_bReached, 0, sizeof(g_bReached)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | ...
s850646351
p01133
C++
#include <iostream> #include <vector> #include <map> #include <cmath> #include <algorithm> using namespace std; typedef struct { int x, y; } pt; int n; pt hero, dragon; double eps = 1e-6; vector<pt> targets; double dist(pt& a, pt& b) { return sqrt(pow(a.x - b.x, 2) + pow(a.y - b.y, 2)); } bool nearer_from_he...
a.cc: In function 'bool nearer_from_hero(const pt&, const pt&)': a.cc:23:17: error: binding reference of type 'pt&' to 'const pt' discards qualifiers 23 | return dist(a, hero) < dist(b, hero); | ^ a.cc:18:17: note: initializing argument 1 of 'double dist(pt&, pt&)' 18 | double dist(pt&...
s445245847
p01133
C++
#include <iostream> #include <vector> #include <utility> #include <string> #include <cmath> inline double dist(int x, int y) { return std::sqrt(x * x + y * y); } inline double dist(std::pair<int, int> pos) { return std::sqrt(pos.first * pos.first + pos.second * pos.second); } inline double dist(int x, int y, std::pai...
a.cc: In function 'bool Solve(double, std::vector<std::pair<int, int> >)': a.cc:68:38: error: no matching function for call to 'find(std::vector<std::pair<int, int> >::iterator, std::vector<std::pair<int, int> >::iterator, std::pair<int, int>&)' 68 | if (std::find(got.begin(), got.end(), x) =...
s221374198
p01133
C++
#include <iostream> #include <vector> #include <utility> #include <algorithm> using namespace std; #define rep(i,n) for(int i=0; i<int(n); i++) #define pii pair<int,int> #define fs first #define sc second typedef pair<pii,int> po; int n; bool cmp(po lhs, po rhs) { if(lhs.sc!=rhs.sc) return lhs.sc<rhs.sc; else ...
a.cc: In function 'int main()': a.cc:41:5: error: 'bit' was not declared in this scope 41 | bit = (1<<(n+1))-1; | ^~~ a.cc: At global scope: a.cc:47:1: error: expected declaration before '}' token 47 | } | ^
s184887547
p01133
C++
#include <bits/stdc++.h> using namespace std; // ????????????????????????±?????????±??? ?? int n; int x[30], y[30]; ?? double dist(int a, int b){ ????????return sqrt((x[a]-x[b])*(x[a]-x[b]) + (y[a]-y[b])*(y[a]-y[b])); } ?? bool solve(){ ????????for(int i=0;i<n;i++){ ????????????????if(dist(n, 0) + dist(0, i) >= dist(n+...
a.cc:4:1: error: expected unqualified-id before '?' token 4 | ?? | ^ a.cc:7:1: error: expected unqualified-id before '?' token 7 | ?? | ^ a.cc:11:1: error: expected unqualified-id before '?' token 11 | ?? | ^ a.cc:18:1: error: expected unqualified-id before '?' token 18 | ?? | ^
s100887739
p01133
C++
#include<iostream> #include<algorithm> using namespace std; int n,h,w,d,e,x,y; double k; double j(int f,int g){return sqrt(f*f+g*g+0.0);} int main(){ while(1){ cin>>n>>x>>y>>d>>e; if(!n)break; cin>>h>>w; bool o=(k<j(d-x,e-y)); n--,k=j(h-x,w-y); while(n--){ cin>>x>>y; if(k+j(h-x,w-y)>=j(d-x,e-y))o=0; } if(o...
a.cc: In function 'double j(int, int)': a.cc:6:30: error: 'sqrt' was not declared in this scope 6 | double j(int f,int g){return sqrt(f*f+g*g+0.0);} | ^~~~
s740578251
p01133
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = double; const ld eps = 1e-9; /* 幾何の基本 */ #include <complex> typedef complex<ld> Point; const ld pi = acos(-1.0); const ld dtop = pi / 180.; const ld ptod = 1. / dtop; namespace s...
a.cc: In function 'Point reflect(const Line&, const Point&)': a.cc:131:19: error: no match for 'operator*' (operand types are 'Point' {aka 'std::complex<double>'} and 'long double') 131 | return pr * 2.l - p; | ~~ ^ ~~~ | | | | | long double...
s718887196
p01133
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int INF=100000000; // Še“_ŠÔ‚Ì‹——£ double dist[22][22]; // Še“_‚̍À•W vector<pair<int,int> > points; int n,hx,hy,dx,dy; bool ok=false; #define EPS (1e-10) #define EQ(a,b) (abs((a) - (b)) < EPS) #define EQV(a,b) (EQ((a).real(),(b).real...
a.cc: In function 'int main()': a.cc:55:28: error: 'sqrt' was not declared in this scope 55 | dist[i][j]=sqrt((double)(points[i].first-points[j].first)*(points[i].first-points[j].first) | ^~~~
s879065990
p01133
C++
#include<iostream> #include<vector> #include<string.h> using namespace std; #define INF 10000000.0 int n,hx,hy,dx,dy; int cx[20],cy[20]; double dp[20][1<<20]; int main() { while(cin>>n>>hx>>hy>>dx>>dy && n!=0){ for(int i=0;i<n;i++) cin>>cx[i]>>cy[i]; for(int i=0;i<n;i++) for(int b=0;b<(1<<n);b++) dp[i...
a.cc: In function 'int main()': a.cc:32:47: error: 'sqrt' was not declared in this scope 32 | time+=sqrt((double)(x-cx[k])*(x-cx[k])+(y-cy[k])*(y-cy[k])); | ^~~~
s519214153
p01133
C++
#include <iostream> #include <cmath> using namespace std; #define EPS (1e-10) // n := クリスタルの個数 int n; // (hx,hy) := 勇者の初期位置 // (dx,dy) := 魔王の位置 int hx, hy, dx ,dy; // (cx[i],cy[i]) := i 番目のクリスタルの位置 int cx[21], cy[21]; // done[i] := i 番目のクリスタルを回収したかどうか bool done[21];] // 答え bool ans; // 2 点間の距離 double dist(double x1,...
a.cc:14:15: error: expected unqualified-id before ']' token 14 | bool done[21];] | ^ a.cc: In function 'void solve(double, int, int)': a.cc:27:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 27 | if( ans ) return ; | ^~~ | abs a.cc:36:9: erro...
s422399620
p01133
C++
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> using namespace std; #define EPS 1e-9 //許容される誤差の程度 int n; double hx, hy, dx, dy; double cry[2][1000]; bool visit[1000]; bool solve(int crynum, double radius, double x, double y) { if(crynum >= n) { return true; } for(int i = 0; i < n; ...
/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
s886910433
p01133
C++
#include <iostream> #include <cstdio> #include <stdio.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define EPS 1e-8 double cost[22][22]; double tlimit[22]; int xx[22]; int cx[22], cy[22]; int n; bool DFS(int pos, int vis, double dis){ if(vis == ((1<<(n+1))-1))ret...
a.cc: In function 'int main()': a.cc:39:42: error: 'pow' was not declared in this scope 39 | tlimit[i] = sqrt(pow(cx[i]*1.0-dx*1.0,2.0)+pow(cy[i]*1.0-dy*1.0,2.0)); | ^~~ a.cc:39:37: error: 'sqrt' was not declared in this scope 39 | ...
s262222414
p01133
C++
#include <iostream> #include <cmath> using namespace std; struct Point { int x, y; }; const double EPS = 1E-8; Point h, d, p[20]; int n; bool flag[20]; bool dfs(double t, int s) { int i; for (i = 0; i < n; i++) { if (!flag[i]) break; } if (i == n) return true; Point pp = (s == -1) ? h : p[s]; for (i = 0;...
a.cc: In function 'int main()': a.cc:41:17: error: 'memset' was not declared in this scope 41 | memset(flag, false, sizeof(flag)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cmath>...
s202045221
p01133
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cstring> #include <cstdio> #include <queue> #include <stack> #include <map> #include <set> #include <bitset> #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...
a.cc: In function 'double dist(P&, P&)': a.cc:32:16: error: 'sqrt' was not declared in this scope 32 | return sqrt(double(a.X-b.X)*(a.X-b.X)+(a.Y-b.Y)*(a.Y-b.Y)); | ^~~~
s736465278
p01133
C++
#include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <ctime> #include <c...
a.cc:35:20: error: 'DBL_MAX' was not declared in this scope 35 | const double INF = DBL_MAX/10; | ^~~~~~~ a.cc:20:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>' 19 | #include <fstream> +++ |+#include <cfloat> 20 | using name...
s426508492
p01133
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int main() { while(true) { int n, hx, hy, dx, dy; cin >> n >> hx >> hy >> dx >> dy; if(!n && !hx && !hy && !dx && !dy) { break; } vector< pair< int, int > > crys; for(int i = 0; i < n; i++) { int x, ...
a.cc: In function 'int main()': a.cc:29:47: error: 'sqrt' was not declared in this scope 29 | u.push_back(make_pair(sqrt((double)(crys[i].first - dx) * (crys[i].first - dx) + (double)(crys[i].second - dy) * (crys[i].second - dy)), sqrt((double)(crys[i].first - hx) * (crys[i].first - hx) + (do...
s200602063
p01133
C++
#include<stdio.h> #include<iostream> #include<algorithm> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; const int INF=100000000; int n; int hx,hy; int dx,dy; int cx[21],cy[21]; bool flag[21]; double dist(int x0,int y0,int x1,int y1) { double d = (x0-x1)*(x0-x1) + (y0-y1)*(y0-y1); return sqrt(d); } ...
a.cc: In function 'double dist(int, int, int, int)': a.cc:19:16: error: 'sqrt' was not declared in this scope 19 | return sqrt(d); | ^~~~
s832729845
p01133
C++
#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; #define MAX 20 #define EPS 1e-9 struct Point{ double x, y; Point(double x = 0,double y = 0) : x(x), y(y) {} Point operator + (const Point &p)const{ return Point(x + p.x , y + p.y); } Point operator - ...
a.cc: In function 'bool solve()': a.cc:105:5: error: 'memset' was not declared in this scope 105 | memset(used, false, sizeof(used)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |+#include ...
s173373036
p01134
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; /* 幾何の基本 */ #include <complex> typedef __float128 ld; typedef complex<ld> Point; #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() const ld eps = 1e-15, pi = acos(-1.0); const ld dtop...
a.cc: In function 'Point input_point()': a.cc:31:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'ld' {aka '__float128'}) 31 | cin >> x >> y; | ~~~ ^~ ~ | | | | | ld {aka __float128} | ...
s457944267
p01134
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; /* 幾何の基本 */ #include <complex> typedef __float128 ld; typedef complex<ld> Point; #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() const ld eps = 1e-15, pi = acos(-1.0); const ld dtop...
a.cc: In function 'std::vector<std::complex<__float128> > is_cc(const Circle&, const Circle&)': a.cc:169:21: error: call of overloaded 'sqrt(ld&)' is ambiguous 169 | ld rs = sqrt(dfr); | ~~~~^~~~~ In file included from /usr/include/features.h:523, from /usr/include/x86_6...
s344998263
p01134
C++
#include <iostream> #include <cmath> #include <vector> using namespace std; inline double add(double a, double b){ return abs(a+b)<(1e-10)*(abs(a)+abs(b)) ? 0.0 : a+b; } struct vec{ long double x,y; vec operator-(vec b){ return (vec){add(x,-b.x),add(y,-b.y)}; } vec operator+(vec b){ ...
a.cc: In function 'int main()': a.cc:121:13: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 121 | sort(l.cp.begin(),l.cp.end()); | ^~~~ | sqrt a.cc:136:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 136 | sort(V.begin...
s759165334
p01134
C++
#include <iostream> #include <vector> #include <complex> #include <set> using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) typedef double D; typedef complex<D> P; typedef pair<P, P> L; const D EPS = 1e-9; const D INF = 1e12; #define X real() #define Y imag() #define EQ(n,m) (abs((n)-(m)) < EPS) #defi...
In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s749940133
p01134
C++
#include <iostream> #include <vector> #include <complex> #include <set> using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) typedef double D; typedef complex<D> P; typedef pair<P, P> L; const D EPS = 1e-9; const D INF = 1e12; #define X real() #define Y imag() #define EQ(n,m) (abs((n)-(m)) < EPS) #defi...
In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s422540070
p01134
C++
#include <bits/stdc++.h> using namespace std; const double EPS = 1e-10, PI = acos(-1); inline bool eq(double a,double b){ return abs(b - a) < EPS; } #define curr(P,i) P[i] #define next(P,i) P[(i+1)%P.size()] #define prev(P,i) P[(i+P.size()-1) % P.size()] enum { OUT, ON, IN }; namespace Geometory { struct Point ...
a.cc: In function 'int main()': a.cc:262:16: error: no match for 'operator!=' (operand types are 'Geometory::Point' and 'Geometory::Point') 262 | if(p != Segments[i].a && p != Segments[i].b) ps.push_back(p); | ~ ^~ | | | Geometory::Point In file inclu...
s269141970
p01134
C++
#ifndef ___Geometry_Library #define ___Geometry_Library // ------ Includes ------ // #include <cmath> #include <vector> #include <complex> #include <utility> #include <algorithm> // ------ Defines ------ // typedef long double GType; typedef std::complex<GType> Point; typedef std::pair<Point, Point> Segment; // ----...
In file included from /usr/include/c++/14/bits/refwrap.h:39, from /usr/include/c++/14/vector:68, from a.cc:6: /usr/include/c++/14/bits/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = std::complex<long double>]': /...
s598479091
p01134
C++
#include<iostream> using namespace std; class Point { public: long double px, py; Point() : px(0), py(0) {}; Point(long double px_, long double py_) : px(px_), py(py_) {}; bool operator==(const Point& p) const { return px == p.px && py == p.py; } bool operator!=(const Point& p) const { return px != p.px || py != p...
a.cc: In function 'long double abs(const Point&)': a.cc:26:42: error: 'sqrtl' was not declared in this scope; did you mean 'strtol'? 26 | long double abs(const Point& a) { return sqrtl(norm(a)); } | ^~~~~ | strtol
s966499126
p01134
C++
#include<iostream> using namespace std; class Point { public: long double px, py; Point() : px(0), py(0) {}; Point(long double px_, long double py_) : px(px_), py(py_) {}; bool operator==(const Point& p) const { return px == p.px && py == p.py; } bool operator!=(const Point& p) const { return px != p.px || py != p...
a.cc: In function 'long double abs(const Point&)': a.cc:26:42: error: 'sqrtl' was not declared in this scope; did you mean 'strtol'? 26 | long double abs(const Point& a) { return sqrtl(norm(a)); } | ^~~~~ | strtol
s661985142
p01134
C++
#include <bits/stdc++.h> #define EPS (1e-10) using namespace std; typedef complex<double> P; //Point typedef pair<P,P> L; //Line, Segment namespace std { bool operator < (const P& a, const P& b){ return fabs(real(a)-real(b)) < EPS ? imag(a) < imag(b) : real(a) < real(b); } bool operator ==(const P& a, c...
a.cc: In function 'int main()': a.cc:77:12: error: expected '}' at end of input 77 | return 0; | ^ a.cc:55:11: note: to match this '{' 55 | int main(){ | ^ a.cc: In function 'P crossPoint(L, L)': a.cc:41:1: warning: control reaches end of non-void function [-Wreturn-type] 41 ...
s067164516
p01134
C++
#include <bits/stdc++.h> #define EPS (1e-10) using namespace std; typedef complex<double> P; //Point typedef pair<P,P> L; //Line, Segment namespace std { bool operator < (const P& a, const P& b){ return fabs(real(a)-real(b)) < EPS ? imag(a) < imag(b) : real(a) < real(b); } bool operator ==(const P& a, c...
a.cc: In function 'int main()': a.cc:77:12: error: expected '}' at end of input 77 | return 0; | ^ a.cc:55:11: note: to match this '{' 55 | int main(){ | ^ a.cc: In function 'P crossPoint(L, L)': a.cc:41:1: warning: control reaches end of non-void function [-Wreturn-type] 41 ...
s275068128
p01134
C++
#ifndef ___Geometry_Library #define ___Geometry_Library // ------ Includes ------ // #include <cmath> #include <vector> #include <complex> #include <utility> #include <algorithm> // ------ Defines ------ // typedef long double GType; typedef std::complex<GType> Point; typedef std::pair<Point, Point> Segment; // ----...
a.cc: In function 'GType distance(const Segment&, const Point&, bool)': a.cc:45:44: error: 'projection' was not declared in this scope 45 | if (!segflag) return std::abs(p1 - projection(s1, p1)); | ^~~~~~~~~~ a.cc:46:26: error: 'projection' was not declared in...
s972945717
p01134
C++
#include "bits/stdc++.h" using namespace std; //#define int long long #define DBG 1 #define dump(o) if(DBG){cerr<<#o<<" "<<(o)<<" ";} #define dumpl(o) if(DBG){cerr<<#o<<" "<<(o)<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep...
a.cc:323:7: error: explicit specialization of 'template<class _Tp> struct std::hash' outside its namespace must use a nested-name-specifier [-fpermissive] 323 | class hash<Point> { | ^~~~~~~~~~~
s060019638
p01134
C++
#!/usr/bin/env python from collections import deque import itertools as it import sys import math sys.setrecursionlimit(1000000) def gcd(a, b): if b == 0: return a a1 = b b1 = a % b return gcd(a1, b1) while True: n = int(input()) if n == 0: break line = [] for loop in...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python | ^ a.cc:24:11: error: invalid preprocessing directive #ax 24 | # ax + by + c = 0 | ^~ a.cc:3:1: error: 'from' does not name a type 3 | from collections import deque | ^~~~ a.cc:30:5: error: exp...
s540991455
p01134
C++
#include <cstdio> #include <complex> #include <vector> using namespace std; typedef complex<double> P; bool eq(double d,dopuble e){return abs(d-e)<1e-10;}; bool eqv(P p,P q){return eq(p.real(),q.real()) && eq(p.imag(),q.imag());} const P nowhere(200,200); double cross_product(P a, P b) { return (conj(a)*b).imag()...
a.cc:8:18: error: 'dopuble' has not been declared 8 | bool eq(double d,dopuble e){return abs(d-e)<1e-10;}; | ^~~~~~~
s449946693
p01134
C++
import static java.lang.Math.*; import static java.util.Arrays.*; import java.util.*; import java.io.*; public class Main { double EPS = 1e-10; ArrayList<L> ls; HashSet<P> cr; void run() { Scanner sc = new Scanner(System.in); for(;;) { int n = sc.nextInt(); if( n == 0 ) break; ls = new ArrayList<...
a.cc:1:1: error: 'import' does not name a type 1 | import static java.lang.Math.*; | ^~~~~~ 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 static java.util.Arrays.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wi...
s124885558
p01135
C
//TLE #include <iostream> #include <queue> #include <utility> #include <algorithm> #include <string> #include <cstdio> using namespace std; struct packet{ int tm,pos,dist; string name; packet(int t,int p,int d,const string&n): tm(t),pos(p),dist(d),name(n){} }; vector<packet> pac; int len[33][33],to[33][33],bac[33...
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s263446403
p01135
C++
#error "X" #include <iostream> #include <vector> #include <algorithm> #include <string> #include <queue> #include <map> using namespace std; const int INF = 1e9; struct mail(){ int time, to, cur, id; bool operator<(mail a, mail b){ if(a.time != b.time) return a.time < b.time; return a.to < b.to; } }; i...
a.cc:1:2: error: #error "X" 1 | #error "X" | ^~~~~ a.cc:12:13: error: expected unqualified-id before ')' token 12 | struct mail(){ | ^ a.cc: In function 'int main()': a.cc:67:12: error: variable 'mail x' has initializer but incomplete type 67 | mail x = que.top(); | ...
s963864105
p01135
C++
tes
a.cc:1:1: error: 'tes' does not name a type 1 | tes | ^~~
s007765489
p01135
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string> using namespace std; struct edge{ int to; int cost; }; int d[33][33]; // cur,to int nxt[33][33]; string letterNames[1001]; const int INF=1000000000; vector<edge>G[101]; void warshall_floyd(int V){ for(int i=0;i<...
a.cc: In function 'int main()': a.cc:84:9: error: 'memset' was not declared in this scope 84 | memset(isArrivalLet,0,sizeof(isArrivalLet)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> +++ ...
s699167616
p01136
Java
mport java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); final int MOD = 1000000007; long start = System.currentTimeMillis(); long fin = System.currentTimeMillis(); int[] dx = { 1, 0, 0, -1 }; int[] dy...
Main.java:1: error: class, interface, enum, or record expected mport java.util.ArrayList; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.Arrays; ^ Main.java:3: error: class, interface, enum, or record expected import java.util.Scanner; ^ 3 errors
s438384269
p01136
Java
import java.io.*; import java.util.*; public class GatherMap { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for(;;) { int N = sc.nextInt(); if (N == 0) break; boolean[][] ok = new boolean[N][31]; for (int i = 0; i < N; i++) { int f = sc.nextInt(); fo...
Main.java:5: error: class GatherMap is public, should be declared in a file named GatherMap.java public class GatherMap ^ 1 error
s056489188
p01136
Java
import java.util.ArrayList; import java.util.Scanner; import java.io.PrintWriter; public class Main { static Scanner scan = new Scanner(System.in); static PrintWriter out = new PrintWriter(System.out); public static void main(String[] args){ while(true){ int n = si(); if(n==0) break; ListArray[] lista = ...
Main.java:12: error: cannot find symbol ListArray[] lista = new ListArray[30]; ^ symbol: class ListArray location: class Main Main.java:12: error: cannot find symbol ListArray[] lista = new ListArray[30]; ^ symbol: class ListArray location: class Main Main.java:13: error:...
s782830449
p01136
C
4 1 1 2 2 3 2 1 2 3 3 4 5
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 4 | ^