submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s581680208
p01146
C++
#include <algorithm> #include <iostream> using namespace std; int main() { for( int N,M,L,K,A,H; cin>>N>>M>>L>>K>>A>>H, N|M|L|K|A|H; ) { bool freez[100]; bool visit[100][101]; int time[100][101]; int length[100][100]; const int INF = INT_MAX / 2; for( int i = 0; i < N; ++i ) { freez[i] = false;...
a.cc: In function 'int main()': a.cc:15:33: error: 'INT_MAX' was not declared in this scope 15 | const int INF = INT_MAX / 2; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #in...
s312682836
p01146
C++
#include<iostream> #include<vector> #include<queue> using namespace std; int N,M,L,K,A,H; bool re[100]; int cost[100][100]; struct Node{ int total,rem,pos,total_b; }; bool operator < (Node a,Node b){ return a.total>b.total; } void solve() { memset(re,false,sizeof(re)); memset(cost,-1,sizeof(cost)); re[A]=re[H...
a.cc: In function 'void solve()': a.cc:21:9: error: 'memset' was not declared in this scope 21 | memset(re,false,sizeof(re)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> +++ |+#include <cst...
s286367383
p01146
C++
#include <cstdio> #include <climits> #include <iostream> #include <vector> #include <queue> using namespace std; #define INF (INT_MAX - 1) #define MAX_M 100 //#define DEBUG #ifdef DEBUG #define //Dprintf(fmt,...) fprintf(stderr,fmt,__VA_ARGS__) #else #define //Dprintf(fmt,...) #endif int N, M, L, K, A, H; struct q...
a.cc:16:27: error: no macro name given in #define directive 16 | #define //Dprintf(fmt,...) | ^
s184084332
p01146
C++
#include <iostream> #include <queue> #include <vector> using namespace std; class Edge{ public: int to, cost; Edge(){} Edge(int to, int cost): to(to), cost(cost){} }; class State{ public: int id, rem, cost; State(){} State(int id, int rem, int cost): id(id), rem(rem), cost(cost){} bool operat...
a.cc: In function 'void solve()': a.cc:35:3: error: 'memset' was not declared in this scope 35 | memset(closed, 0, sizeof(closed)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queue> +++ |+#include <cstring>...
s121056154
p01146
C++
2 1 0 1 0 1 0 1 2 3 1 1 2 0 1 2 0 2 1 1 2 1 3 2 1 2 0 1 2 0 2 1 1 2 1 4 4 1 4 1 3 2 0 1 2 1 2 4 0 2 1 3 0 3 5 3 2 6 0 3 1 2 2 1 2 1 0 1 3 4 1 2 4 1 4 1 2 2 0 2 5 4 2 6 0 3 1 2 4 2 4 2 1 2 4 3 1 0 1 5 1 4 2 2 0 3 0 0 0 0 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 1 0 1 0 1 | ^
s285804674
p01146
C++
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <queue> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
a.cc: In function 'int main()': a.cc:107:64: error: expected ',' or ';' at end of input 107 | int nz=z-g[x][i].second | ^ a.cc:107:64: error: expected '}' at end of input a.cc:106:54: note: to match this '{' ...
s552115833
p01146
C++
#include<iostream> #include<algorithm> #include<vector> #include<map> #include<queue> using namespace std; typedef pair<int, int> P; typedef pair<int, P> T; vector<P> edge[105]; int n, m, l, k, a, h; bool recover[105]; dist[105][105]; void dijkstra(int s){ for(int i = 0;i < 105;i++) for(int j = 0;j < 105;j++) ...
a.cc:15:1: error: 'dist' does not name a type 15 | dist[105][105]; | ^~~~ a.cc: In function 'void dijkstra(int)': a.cc:20:25: error: 'dist' was not declared in this scope 20 | dist[i][j] = INF; | ^~~~ a.cc:20:38: error: 'INF' was not declared in this sco...
s840192351
p01146
C++
#include<iostream> #include<algorithm> #include<vector> #include<map> #include<queue> using namespace std; #define INF (1 << 30) typedef pair<int, int> P; typedef pair<int, P> T; vector<P> edge[105]; int n, m, l, k, a, h; bool recover[105]; int dist[105][105]; void dijkstra(int s){ for(int i = 0;i < 105;i++) for(...
a.cc: In function 'void dijkstra(int)': a.cc:31:57: error: 'conitnue' was not declared in this scope 31 | if(dist[to][blood - r] <= d + r)conitnue; | ^~~~~~~~
s322126664
p01146
C++
#include<iostream> #include<algorithm> #include<vector> #include<map> #include<queue> using namespace std; #define INF (1 << 30) typedef pair<int, int> P; typedef pair<int, P> T; vector<P> edge[105]; int n, m, l, k, a, h; bool recover[105]; int dist[105][105]; void dijkstra(int s){ for(int i = 0;i < 105;i++) for(...
a.cc: In function 'void dijkstra(int)': a.cc:31:57: error: 'cobtinue' was not declared in this scope 31 | if(dist[to][blood - r] <= d + r)cobtinue; | ^~~~~~~~
s549229978
p01146
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <map> #include <cstring> #include <string> #include <cstdlib> #include <cstdio> using namespace std; typedef pair<int, int> pii; typedef long long int ll; #define REP(i,x) for(int i=0;i<(int)(x);i++) #define FOR(i,c) for...
a.cc:36:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 36 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:94:7: error: expected ';' before '{' token 94 | main(){ | ^ | ; a.cc:147:38: error: conversion from 'DP' to non-scalar type 'main()::DP' req...
s692807617
p01146
C++
#include<cstdio> #include<cstdlib> #include<utility> #include<vector> #include<queue> #include<algorithm> using namespace std; const int INF=99999; typedef struct p{int pos,dis;}p; typedef struct e{int to,cost;}e; int N,M,L,K,A,H,C[100],D[100];; struct Order { bool operator ()(p const& a, p const& b) const { re...
a.cc: In function 'int main()': a.cc:53:17: error: 'memset' was not declared in this scope 53 | memset(C,0,sizeof(C)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<algorithm> +++ |+...
s762944176
p01147
Java
import java.util.*; import static java.lang.Math.*; public class Main { final Scanner sc=new Scanner(System.in); public static void main(String[] args) { new Main().init(); } void init(){ final long STACK_SIZE=8*1024*1024; new Thread(null, new AOJ2022(), "RUN", STACK_SIZE).start(); } class AOJ2022 impleme...
Main.java:95: error: reached end of file while parsing } ^ 1 error
s800965302
p01147
Java
import java.util.* import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; import static java.util.Collections.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-12; HashSet<String> set; void run(){ for(;;)...
Main.java:1: error: ';' expected import java.util.* ^ 1 error
s311541572
p01147
C++
#include<bits/stdc++.h> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) const int N = 11; int n; vector<string> in; bool input(){ cin>>n; if(n==0)return false; in.clear(); rep(i,n){ string a; cin>>a; in.push_back(a); } return true; } string...
a.cc:47:12: error: 'int index [11]' redeclared as different kind of entity 47 | int index[N]; | ^ 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...
s582083091
p01147
C++
#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstring> #include <cmath> #include <fstream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #inc...
a.cc: In function 'int main()': a.cc:84:75: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 84 | dp[S][i] = foo(dp[S][i], dp[T][j] + t[j][i]); a.cc:35:31: not...
s965060850
p01147
C++
#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstring> #include <cmath> #include <fstream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #inc...
a.cc: In function 'int main()': a.cc:84:75: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 84 | dp[S][i] = foo(dp[S][i], dp[T][j] + t[j][i]); a.cc:35:31: not...
s139753748
p01147
C++
#include<iostream> #include<vector> #include<string> #include<cstdlib> #include<cstring> #include<queue> #include<cmath> //#include<> using namespace std; #define rep(i, n) for(int i=0;i<(int)(n);i++) #define REPS(i, n) for(int i=1;i<=(int)(n);i++) #define RREP(i, n) for(int i=(int)n-1;i>=0;i--) #define RREPS(i, n) fo...
a.cc: In function 'int main()': a.cc:57:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)' 57 | cin.tie(false); cout.tie(false); | ~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/ios:46, from /usr/include/c++/14/ostream:40, ...
s770498906
p01147
C++
#include<iostream> #include<vector> #include<string> using namespace std; vector<string> v; int n; int d[10][10]={{}}; string ans; void solve(vector<int> l){ string b; b=v[l[0]]; for(int i=1;i<n;i++){ b+=v[l[i]].substr(d[l[i-1]][l[i]],v[l[i]].size()-d[l[i-1]][l[i]]); } //cout << b << endl; if(ans.size(...
a.cc: In function 'int main()': a.cc:72:12: error: 'next_permutation' was not declared in this scope 72 | }while(next_permutation(l.begin(),l.end())); | ^~~~~~~~~~~~~~~~
s872737385
p01147
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<queue> #define MAX 11 #define S_MAX 101 using namespace std; bool InsideCommon( const char *a, const char *b ){ if( strstr( a, b ) ) return true; else return false; } void Overlap( const char *a, const char *b, char * ret ){ un...
a.cc: In function 'bool InsideCommon(const char*, const char*)': a.cc:13:13: error: 'strstr' was not declared in this scope 13 | if( strstr( a, b ) ) | ^~~~~~ a.cc:6:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<...
s252282298
p01147
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define NEWPATH 0 #define OLDPATH 1 #define SAME 2 typedef vector<string> vecs; const int INF = (1 << 21); int cost[10][10]; strin...
a.cc: In function 'std::string solve(vecs)': a.cc:22:24: warning: overflow in conversion from 'int' to 'char' changes value from '2097152' to '0' [-Woverflow] 22 | rep(j,n)dp[i][j] = INF; | ^~~ a.cc:32:32: error: no match for 'operator<' (operand types are 'std::__cxx11::basic_string...
s187332962
p01147
C++
#include <iostream> #include <string> #include <vector> using namespace std; vector<string> v(10); vector<bool> used(10, false); int N; int bestlen; string bestans; string concat(const string &s1, const string &s2) { string tmp = s1; for(int i = s2.size(); i >= 0; --i) { if(s1.size() < i) continue; int start =...
a.cc: In function 'int main()': a.cc:61:27: error: 'INT_MAX' was not declared in this scope 61 | bestlen = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <vector> ...
s995906776
p01147
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include...
a.cc:40:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 40 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:72:11: error: 'ok' was not declared in this scope 72 | ok=false; | ^~
s155772869
p01147
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; #define REP(i,m,n) for(int i=m;i<n;i++) #define rep(i,n) REP(i,0,n) int g[10][10]; string s[10]; string dpv[10][1<<10]; bool dp[10][1<<10]; int n; string mini(const string& a,const string& b) { if(a.size()==b.size())ret...
a.cc: In function 'int main()': a.cc:73:5: error: 'memset' was not declared in this scope 73 | memset(dp,0,sizeof(dp)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |+#include <cstring> ...
s752814846
p01147
C++
#include <iostream> #include <string> #include <vector> #include <queue> #include <set> #include <map> using namespace std; class State{ public: string str; int s, cnt; State() : str(""), s(0), cnt(cnt) {} State(string str, int s, int cnt) : str(str), s(s), cnt(cnt){} bool operator<(const State &p) const { ...
a.cc:70:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 70 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:91:5: error: 'sort' was not declared in this scope; did you mean 'short'? 91 | sort(edge.begin(), edge.end()); | ^~~~ | short a.cc: In funct...
s101116567
p01147
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ int n,BtoA,okay; string s,m; char v[100]; while(1){ okay=0; BtoA=0; cin >> n; if(n == 0)break; for(int i=0;i<n;i++){ s.clear(); cin >> s; if(i == 0){ m.insert(BtoA,s); //BtoA+=...
a.cc:73:5: error: redefinition of 'int main()' 73 | int main(){ | ^~~~ a.cc:6:5: note: 'int main()' previously defined here 6 | int main(){ | ^~~~
s664778607
p01147
C++
#include<iostream> #include<string> using namespace std; int n; string s[10]; string p[10][10]; string ans; int min_cost; bool done[10]; void dfs(int now,string str,int k){ // cout<<str<<endl; if(str.size()>=min_cost) return; if(k==n){ if(str.size()<min_cost){ min_cost=str.size(); ans=str; } else if(s...
a.cc: In function 'int main()': a.cc:41:17: error: 'memset' was not declared in this scope 41 | memset(done,false,sizeof(false)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream...
s388691441
p01147
C++
#include <algorithm> #include <string> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <map> #include <numeric> #include <queue> #include <set> #include <vector> using namespace std; #define reps(i,f,n) for(int i=f; i<int(n);...
a.cc: In function 'void dfs(int, char*, int)': a.cc:43:22: error: reference to 'array' is ambiguous 43 | swap(array[i], array[depth]); | ^~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, ...
s236732259
p01147
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc: In function 'int main()': a.cc:109:109: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'} 109 | dp[mask|(1<<j)][j]=smal...
s628928135
p01147
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #define all(c) (c).begin(),(c).end() #define INF (1<<29) using namespace std; typedef unsigned long long ull; ull B=5791455; int overlap(string a,string b){ int al=a.size(),bl=b.size(),ans=0; ull ah=0,bh=0,t=1; for(int i=1;i<=min(al,bl)...
a.cc:47:5: error: redefinition of 'int dp [11][2048]' 47 | int dp[11][1<<11]; | ^~ a.cc:44:5: note: 'int dp [11][2048]' previously declared here 44 | int dp[11][1<<11]; | ^~ a.cc:48:8: error: redefinition of 'std::string path [11][2048]' 48 | string path[11][1<<11]; | ^~~~ a.cc...
s317335923
p01147
C++
//////////////////// /// template /// //////////////////// #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 <se...
a.cc: In function 'void solve()': a.cc:263:64: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 263 | string &x = cost[k][j] + dp[j][i | 1 << j];
s423337524
p01148
C++
#include <iostream> #include <cstdio> #include <vector> #include <set> #include <map> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <cstring> #include <functional> #include <cmath> #include <complex> using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) #define rep1(i,n) for(in...
a.cc: In function 'int main()': a.cc:54:36: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'double') 54 | cin>>T[i+1]>>v[i].real()>>v[i].imag(); | ~~~~~~~~~~~^~~~~~~~~~~~~ ...
s692089318
p01149
C++
#include<stdio.h> #include<algorithm> using namespace std; char in[20]; int main(){ int a;scanf("%d",&a); while(a--){ for(int i=0;i<10;i++)scanf("%s",in+i); int val=0; int ace=0; if(in[0]=='A'){val+=11;ace++;} else if(in[0]=='T'||in[0]=='J'||in[0]=='Q'||in[0]=='K'){val+=10;} else val+=in[0]-'0'; if(in[1...
a.cc: In function 'int main()': a.cc:22:54: error: expected ')' before '{' token 22 | while((val<17||(val==17&&ace)&&at<10){ | ~ ^ | )
s417655397
p01149
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int score[200]; fill(score,score+200,0); for(char ch = '2'; ch <= '9'; ch++) score[ch]=ch-'0'; score['T']=score['J']=score['Q']=score['K']=10; score['A']=11; int n; cin>>n; while(n--){ ...
a.cc: In function 'int main()': a.cc:68:37: error: 'j' was not declared in this scope 68 | int ccs=(cs+j*11+(aNum-j)); | ^ a.cc:107:16: error: 'b' was not declared in this scope 107 | if(b) | ^ a.cc:110:23: error: 'f...
s157604610
p01149
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; for(int i=1; i<=n; i++){ char hand; int point = 0; int one = 0; bool isblackjack = false; bool isace = false; char a, b; cin >> a >> b; if(a == 'A' && (b == 'T' || b == 'K' ...
a.cc: In function 'int main()': a.cc:18:9: error: 'elseif' was not declared in this scope 18 | elseif(b == 'A' && (a == 'T' || a == 'K' || a == 'Q' || a == 'J')){ | ^~~~~~ a.cc:21:9: error: 'else' without a previous 'if' 21 | else if(a == 'A'){ | ^~~~
s875757556
p01151
C
// AOJ 2026: Divisor is the Conqueror // 2017.11.03 bal4u@uu #include <stdio.h> #include <string.h> #include <time.h> int c[15]; int ans[54]; char f[14][365]; // 364=(13+1)*13/2*4 int rec(int j, int k) { int i; if (!j) return 1; for (i = 1; i <= 13; i++) { if (!c[i]) continue; if (f[i][k-i]) { c[i]--, an...
main.c: In function 'main': main.c:33:9: error: 'start' undeclared (first use in this function) 33 | start = clock(); | ^~~~~ main.c:33:9: note: each undeclared identifier is reported only once for each function it appears in
s989928570
p01151
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <vector> #include <string> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> using namespace std; #define rep(i,j) REP((i), 0, (j)) #define REP(i,j,k) for(int i=(j);(i)<(k);++i) #de...
a.cc: In function 'int main()': a.cc:51:22: error: 'N' was not declared in this scope 51 | while(scanf("%d", &N) && N){ | ^
s810845724
p01152
C++
#include<iostream> #include<map> #include<vector> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define ALL(C) (C).begin(),(C).end() const int CONST = 12; bool have_same(vector<int> &a){ rep(i,a.size())REP(j,i+1,a.size())if (a[i] == a[j])...
a.cc: In function 'void generate(std::vector<std::__cxx11::basic_string<char> >&, std::vector<std::vector<int> >&)': a.cc:67:5: error: 'sort' was not declared in this scope; did you mean 'short'? 67 | sort(ALL(b[i])); | ^~~~ | short a.cc: At global scope: a.cc:84:1: warning: ISO C++ forbids d...
s305837074
p01153
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int n; int k; int a[101]; int dp[101][101]; int dfs(int from,int to){ //if(from==to)return 0; if(dp[from][to]!=-1)return dp[from][to]; int res=0; for(int i=(from+1)%k;i!=(to+1)%k;i=(i+1)%k){ res=max(res,abs(a[from...
a.cc: In function 'int main()': a.cc:33:13: error: 'memset' was not declared in this scope 33 | memset(dp,-1,sizeof(dp)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#includ...
s047053159
p01154
C++
#include<iostream> #include<complex> #include<algorithm> #include<vector> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define ALL(C) (C).begin(),(C).end() #define mp make_pair typedef complex<double> P; const double eps = 1e-10; n...
a.cc: In function 'void find_onp(std::vector<std::complex<double> >&, std::vector<std::complex<double> >&, P&, P&, std::vector<std::complex<double> >&, bool, P&, P&)': a.cc:100:5: error: 'assert' was not declared in this scope 100 | assert(abs(tret[0]-a)<eps); | ^~~~~~ a.cc:5:1: note: 'assert' is define...
s903476104
p01155
C++
#include <stdio.h> #include <algorithm> int a, b; int main() { while(scanf("%d%d", &a, &b), a + b) { int ret = 999999999; for(int i = 1; i * i <= a; i++) { if(a % i) continue; for(int j = 1; j * j <= b; j++) { if(b % j) continue; int p[4] = { i, a / i, j, b / j }; std::sort(p, p + 4); int res...
a.cc: In function 'int main()': a.cc:15:39: error: 'min' was not declared in this scope; did you mean 'std::min'? 15 | ret = min(ret, res); | ^~~ | std::min In file included from /usr/include/c++/1...
s835430752
p01155
C++
#include<bits/stdc++.h> #define r(i,a,n) for(int i=a;i<n;i++) #define R(i,a,n) for(int i=a;i>n;i--) using namespace std ; int main(){ int a,b; while(cin>>a>>b,a){ int aa[a/2+1][2],bb[b/2+1][2],c=0,cc=0; bool ac[10001],bc[10001]; r(i,0,10001)ac[i]=0; r(i,0,10001)bc[i]=0; r(i,1,a){ if(!ac[i]...
a.cc: In function 'int main()': a.cc:39:21: error: 'p' was not declared in this scope 39 | sort(t,t+4);p=0; | ^ a.cc:46:14: error: no matching function for call to 'min(long long int&, int)' 46 | m=min(m,l[0]*l[0]+l[1]*l[1]+l[2]*l[2]); | ~~~^~~~~~~~~~~~~~~...
s581931198
p01155
C++
#include<bits/stdc++.h> #define r(i,a,n) for(int i=a;i<n;i++) #define R(i,a,n) for(int i=a;i>n;i--) using namespace std ; int main(){ int a,b; while(cin>>a>>b,a){ int aa[a/2+1][2],bb[b/2+1][2],c=0,cc=0; bool ac[10001],bc[10001]; r(i,0,10001)ac[i]=0; r(i,0,10001)bc[i]=0; r(i,1,a){ if(!ac[i]...
a.cc: In function 'int main()': a.cc:43:14: error: no matching function for call to 'min(long long int&, int)' 43 | m=min(m,l[0]*l[0]+l[1]*l[1]+l[2]*l[2]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-...
s307157871
p01155
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,s,k; while(cin>>a>>b,a){ int m=1e9; for(int i=1;i*i<=a;i++){ if(a%i)continue; for(int j=1;j*j<=b;j++){ if(b%j)continue; int p[4]; p[0]=i;p[1]=a/i;p[2]=j;p[3]=b/j; sort(p,p+4); for(s=k=0;k<3;k...
a.cc: In function 'int main()': a.cc:19:1: error: expected primary-expression before '?' token 19 | ??} | ^ a.cc:19:2: error: expected primary-expression before '?' token 19 | ??} | ^ a.cc:19:3: error: expected primary-expression before '}' token 19 | ??} | ^ a.cc:19:3: error: expected ':'...
s460584497
p01155
C++
#include<iostream> #include<algorithm> #define sq(a) ((a)*(a)) #define INFTY (1<<30) using namespace std; int main(){ while(true){ int ans = INFTY; int s[4]; int a,b; scanf("%d%d", &a, &b); if( a==0 && b==0 ) break; for(int i = 1; i < a; ++i){ if( a % i == 0 ){ for(int j = 1; j < b; ++j){ if( b...
a.cc: In function 'int main()': a.cc:23:64: error: 'sum' was not declared in this scope; did you mean 'sum1'? 23 | ans = min(ans, sum); | ^~~ | ...
s153743846
p01156
C++
#include<iostream>
/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
s805294071
p01156
C++
import java.util.Scanner; public class Main{ class Hand{ String str; int type; boolean res = false; int draw=0; int w1, w2; Hand(){ } Hand(String str, int type, int w1, int w2){ this.str = str; this.type = type; this.w1 = w1; this.w2 = w2; } void tcount(Hand a[], int n){ int wi...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s559007507
p01156
C++
#include <iostream> #include <string> using namespace std; int main(){ bool data[15][15]; for(int i=0;i<15;i++){ for(int j=0;j<15;j++){ data[i][j]=false; } } for(int count=0;count<7;count++){ data[0][count+8]=true; } for(int i=1;i<15;i++){ for(int j=0;j<15;j++){ if(j==0) data[...
a.cc:128:5: error: redefinition of 'int main()' 128 | int main(){ | ^~~~ a.cc:5:5: note: 'int main()' previously defined here 5 | int main(){ | ^~~~
s806184302
p01156
C++
#include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; #define MAX 15 const string gesture[MAX] = { "Rock","Fire","Scissors","Snake","Human","Tree","Wolf","Sponge", "Paper","Air","Water","Dragon","Devil","Lightning","Gun" }; vector<int> v; bool ges[MAX]; int solve(){ i...
a.cc: In function 'int main()': a.cc:67:5: error: 'memset' was not declared in this scope 67 | memset(ges,false,sizeof(ges)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |+#include <cstrin...
s370011416
p01158
C++
#include<iostream> #include<algorithm> #include<map> #include<vector> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) const int inf = 3000*1000; const int N = 2000; int ori[N]; int tool[N]; bool is_in_loop[N]; int ans; void calc_loop_min(int *a,int p){ int ret = inf; ...
a.cc: In function 'void dfs(int, int*, int)': a.cc:37:5: error: 'assert' was not declared in this scope 37 | assert(st[0] == now); | ^~~~~~ a.cc:5:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 4 | #include<vector> +++ |+#include <casse...
s643876096
p01159
C++
#include <iostream> #include <vector> #include <cstdio> #include <algorithm> #include <functional> using namespace std; #define fst first #define snd second #define all(c) ((c).begin()), ((c).end()) template <class F> double integrate(F f, double a, double b, double eps = 1e-8) { const double C = asin(1.0), T = 1...
a.cc: In function 'double integrate(F, double, double, double)': a.cc:15:20: error: there are no arguments to 'asin' that depend on a template parameter, so a declaration of 'asin' must be available [-fpermissive] 15 | const double C = asin(1.0), T = 10.0; | ^~~~ a.cc:15:20: note: (if you ...
s888149092
p01159
C++
// // Numerical Integration (Adaptive Gauss--Lobatto--Kronrod) // // Description: // Gauss--Lobatto formula is a numerical integrator // that is accurate for polynomials of degree <= 2n+1. // Adaptive Gauss--Lobatto recursively divides the domain // and computes integral by using G-L formula. // // Algorithm: /...
a.cc: In lambda function: a.cc:44:22: error: there are no arguments to 'sqrt' that depend on a template parameter, so a declaration of 'sqrt' must be available [-fpermissive] 44 | const double a = sqrt(2.0/3.0), b = 1.0 / sqrt(5.0); | ^~~~ a.cc:44:22: note: (if you use '-fpermissive', ...
s614069330
p01160
C++
#include <cstdio> #include <cstring> #include <string> using namespace std; int dp[1024][1024]; int main() { char s[2048]; while (scanf("%s", s) == 1){ char s1[1024], s2[1024]; int len = strlen(s); strncpy(s1, s, len / 2); strrev(s); strncpy(s2, s, len / 2); s1[len / 2] = s2[len / 2] = '\0'; mem...
a.cc: In function 'int main()': a.cc:17:17: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 17 | strrev(s); | ^~~~~~ | strsep
s665571797
p01161
C++
#include<iostream> #include<queue> #include<vector> #include<complex> #include<cmath> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define NODE(i,j,c) ((i)*c+(j)+2) #define ALL(C) (C).begin(),(C).end() typedef long long ll; typedef complex<d...
a.cc: In function 'void setpos(int, int, int, std::vector<int>&, std::vector<int>&)': a.cc:106:21: error: 'upper_bound' was not declared in this scope 106 | int tmp=(int)(upper_bound(ALL(y),ys)-y.begin())-1; | ^~~~~~~~~~~ a.cc:116:21: error: 'upper_bound' was not declared in this scope...
s891874831
p01161
C++
#include<iostream> #include<queue> #include<vector> #include<complex> #include<cmath> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define NODE(i,j,c) ((i)*c+(j)+2) #define ALL(C) (C).begin(),(C).end() //typedef long long...
a.cc:18:17: error: 'INT_MAX' was not declared in this scope 18 | const int inf = INT_MAX/4; | ^~~~~~~ a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 6 | #include<algorithm> +++ |+#include <climits> 7 | using namespac...
s655096647
p01161
C++
#include<iostream> #include<vector> #include<queue> #include<cassert> using namespace std; #define NORTH 0 #define EAST 2 #define SOUTH 1 #define WEST 3 #define INF (1 << 29) int dx[]={0,0,1,-1}; int dy[]={-1,1,0,0}; int for_waitcost[]={1,1,0,0}; long long cost[4][105][105];//101*0 node means the start.101*1node mea...
a.cc: In function 'int dijkstra(state)': a.cc:70:50: error: no matching function for call to 'min(int&, long long int&)' 70 | if (now.y == 1 && now.x == 104)return ans=min(ans,now.cost);//return now.cost; | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c...
s792886630
p01161
C++
#include<iostream> #include<vector> #include<algorithm> #include<queue> #include<cassert> using namespace std; #define NORTH 0 #define EAST 2 #define SOUTH 1 #define WEST 3 #define INF (1 << 29) int dx[]={0,0,1,-1}; int dy[]={-1,1,0,0}; int for_waitcost[]={1,1,0,0}; long long cost[4][105][105];//101*0 node means the...
a.cc: In function 'int dijkstra(state)': a.cc:71:50: error: no matching function for call to 'min(int&, long long int&)' 71 | if (now.y == 1 && now.x == 104)return ans=min(ans,now.cost);//return now.cost; | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c...
s609894142
p01163
C++
require 'prime' ### constant MAX_T = 30000; MAX_SIDE = (MAX_T - 1) / 2; ### main pnums = Prime.each(MAX_SIDE).map{|pn| pn} #p pnums loop do t = gets.to_i break if t == 0 count = 0 mina = t / 3 maxside = (t - 1) / 2 for a in pnums next if a < mina break if a > maxside for b in pnums ...
a.cc:1:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 1 | require 'prime' | ^~~~~~~ a.cc:3:1: error: stray '##' in program 3 | ### constant | ^~ a.cc:3:3: error: stray '#' in program 3 | ### constant | ^ a.cc:8:1: error: stray '##' in program ...
s432545192
p01163
C++
#include <iostream> using namespace std; int n, c, p[5000]; bool prime[30001]; int main() { for(int i = 2; i <= 30000; i++) prime[i] I true; for(int i = 2; i * i <= 30000; i++) { if(!prime[i]) continue; for(int j = i * i; j <= 30000; j += i) prime[j] = false; } for(int i = 2; i <= 30000; i++) { if(prime[i]) p...
a.cc: In function 'int main()': a.cc:5:49: error: expected ';' before 'I' 5 | for(int i = 2; i <= 30000; i++) prime[i] I true; | ^~ | ;
s794391062
p01163
C++
#include<bits/stdc++.h> using namespace std; #define mk make_pair int s[30001],ss[30001],c=2; vector<int>a; vector<int>::iterator it; unordered_set<pair<int,pair<int,int> > >se; int main(){ s[0]=2;s[1]=3;ss[2]=ss[3]=1; for(int i=2;i<30001;i++){ int p=0; for(int j=2;j*j<=i;j++) if(i%j==0)p++; if(!p...
a.cc:7:41: error: use of deleted function 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::pair<int, std::pair<int, int> >; _Hash = std::hash<std::pair<int, std::pair<int, int> > >; _Pred = std::equal_to<std::pair<int, std::pair<int, int> > >; _Alloc = std::allocator<std::pair<int,...
s359584937
p01163
C++
#include<bits/stdc++.h> using namespace std; #define mk make_pair int s[30001],ss[30001],c=2; unordered_set<long long>se; int main(){ ????s[0]=2;s[1]=3;ss[2]=ss[3]=1; ????for(int i=2;i<30001;i++){ ????????int p=0; ????????for(int j=2;j*j<=i;j++) ????????????if(i%j==0)p++; ????????if(!p)ss[i]++,s[c++]=i; ????} ????int n...
a.cc: In function 'int main()': a.cc:7:1: error: expected primary-expression before '?' token 7 | ????s[0]=2;s[1]=3;ss[2]=ss[3]=1; | ^ a.cc:7:2: error: expected primary-expression before '?' token 7 | ????s[0]=2;s[1]=3;ss[2]=ss[3]=1; | ^ a.cc:7:3: error: expected primary-expression before '?' token...
s576816363
p01163
C++
#include<iostream> main(){int p[30001],M=30001,T,a,i,j,k;for(i=1;i*i++<M;)for(j=i+i;!p[i]&j<M;j+=i)p[j]=1;for(;std::cin>>T,T;printf("%d\n",a))for(a=0,i=2;i<T;i++)for(j=i;!p[i]&j<=(k=T-i-j);j++){if(p[j]||p[k]||i+j<=k)continue;a++}}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){int p[30001],M=30001,T,a,i,j,k;for(i=1;i*i++<M;)for(j=i+i;!p[i]&j<M;j+=i)p[j]=1;for(;std::cin>>T,T;printf("%d\n",a))for(a=0,i=2;i<T;i++)for(j=i;!p[i]&j<=(k=T-i-j);j++){if(p[j]||p[k]||i+j<=k)continue;a++}} | ^~~~ a...
s425949095
p01168
Java
import java.io.*; import java.util.*; import java.math.*; class Main{ public static void main(String[] args){ BufferedReader sc=new BufferedReader(new InputStreamReader(System.in)); try { while(true){ String[] st = sc.readLine().split(" "); int a = Integer.valueOf(st[0]),b = Integer.valueOf(st[1]),c = In...
Main.java:27: error: cannot find symbol System.out.println(min); ^ symbol: variable min location: class Main 1 error
s857309165
p01169
C++
#include<iostream> #include<complex> #include<vector> #include<cmath> #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define NEXT(i,n) ((i+1)%(n)) #define mp make_pair #define pb push_back using namespace std; typedef complex<double> P; const double pi = acos(-1); pair<double,...
a.cc: In function 'double solve(std::vector<std::complex<double> >&, std::vector<std::complex<double> >&)': a.cc:66:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 66 | sort(a.begin(),a.end()); | ^~~~ | sqrt a.cc: At global scope: a.cc:71:1: warning: ISO C++ forbids declaratio...
s510232433
p01171
C++
#include<iostream> #include<vector> #include<cmath> using namespace std; typedef long long ll; ll prime[1000001]; ll length = 0; void insert(ll p) { prime[length] = p; length++; return; } int main() { insert(2); for (ll i = 3; i < 1000000; i += 2) { for (ll j = 0; j < length; j++) if (i%prime[j] == 0)goto cont;...
a.cc: In lambda function: a.cc:26:42: error: expected '{' before ';' token 26 | ac += [i]; | ^ a.cc: In function 'int main()': a.cc:26:36: error: no match for 'operator+=' (operand types are 'll' {aka 'long long int'} and 'main()::<lambda...
s187085252
p01171
C++
#include <iostream> using namespace std; int bunkai(int); bool data[1000000]; int n, m; main(){ while(1){ cin >> n >> m; if(n==0 && m==0) break; for(int i=0;i<=n;i++) data[i]=false; int a=bunkai(n); for(int i=0;i<=m;i++) data[i]=false; int b=bunkai(m); if(a>=b) cout << 'a' << endl; ...
a.cc:10:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 10 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:15:27: error: reference to 'data' is ambiguous 15 | for(int i=0;i<=n;i++) data[i]=false; | ^~~~ In file included from /usr/inclu...
s006491381
p01172
C++
#include <iostream> #include <string> #include <cmath> using namespace std; int rem[1000000]; void solve(int x, int y){ int a, b; memset(rem, -1, sizeof(rem)); for (int i = 0; ; i++) { if (rem[x] != -1) { if (x == 0) { a = i - 1; b = 0; } else { a = rem[x]; b = i - rem[x]; ...
a.cc: In function 'void solve(int, int)': a.cc:10:3: error: 'memset' was not declared in this scope 10 | memset(rem, -1, sizeof(rem)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cmath> +++ |+#include <cstri...
s165395327
p01172
C++
#include <iostream> #include <string> #include <cstdlib> using namespace std; int rem[1000000]; void solve(int x, int y){ int a, b; memset(rem, -1, sizeof(rem)); for (int i = 0; ; i++) { if (rem[x] != -1) { if (x == 0) { a = i - 1; b = 0; } else { a = rem[x]; b = i - rem[x]; ...
a.cc: In function 'void solve(int, int)': a.cc:10:3: error: 'memset' was not declared in this scope 10 | memset(rem, -1, sizeof(rem)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cstdlib> +++ |+#include <cst...
s794968599
p01173
C
#include <cstdio> #include <iostream> #include <vector> #include <list> #include <cmath> #include <fstream> #include <algorithm> #include <string> #include <queue> #include <set> #include <map> #include <complex> #include <iterator> #include <cstdlib> #include <cstring> #include <sstream> using namespace std; #define...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s102775014
p01173
C
#include <cstdio> #include <iostream> #include <vector> #include <list> #include <cmath> #include <fstream> #include <algorithm> #include <string> #include <queue> #include <set> #include <map> #include <complex> #include <iterator> #include <cstdlib> #include <cstring> #include <sstream> using namespace std; #define...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s204708200
p01174
C++
#include<cmath> #include<iostream> #include<complex> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) typedef complex<double> P; const double eps = 1e-9; double pi= acos(-1); double cross(P a,P b){ return a.real()*b.imag()-a.imag()*b.real(); } int ccw(P a,P b){ if ( cros...
a.cc: In function 'void ConvexHull(int, P*, P*, int&)': a.cc:29:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 29 | sort(inp,inp+n); | ^~~~ | sqrt a.cc: In function 'void rotate_all(int, P*, P*, double)': a.cc:68:16: error: lvalue required as left operand of assignment 68 ...
s659818937
p01174
C++
#include<cmath> #include<iostream> #include<complex> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) typedef complex<double> P; const double eps = 1e-9; double pi= acos(-1); double cross(P a,P b){ return a.real()*b.imag()-a.imag()*b.real(); } int ccw(P a,P b){ if ( cros...
a.cc: In function 'void ConvexHull(int, P*, P*, int&)': a.cc:29:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 29 | sort(inp,inp+n); | ^~~~ | sqrt a.cc: In function 'void rotate_all(int, P*, P*, double)': a.cc:68:16: error: lvalue required as left operand of assignment 68 ...
s426509627
p01174
C++
#include<cmath> #include<iostream> #include<complex> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) typedef complex<double> P; const double eps = 1e-9; double pi= acos(-1); double cross(P a,P b){ return a.real()*b.imag()-a.imag()*b.real(); } int ccw(P...
a.cc: In function 'void rotate_all(int, P*, P*, double)': a.cc:69:16: error: lvalue required as left operand of assignment 69 | out[i].real()=in[i].real()*cos(angle)-in[i].imag()*sin(angle); | ~~~~~~~~~~~^~ a.cc:70:16: error: lvalue required as left operand of assignment 70 | out[i].imag()=in[i]...
s668299026
p01174
C++
#include<iostream> #include<vector> #include<algorithm> #include<complex> #include<cmath> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define mp make_pair #define pb push_back #define fir first #define sec second //#define double long double ...
a.cc: In function 'P norm(P, P)': a.cc:75:7: error: no matching function for call to 'swap(double, double)' 75 | swap(tmp.real(),tmp.imag()); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, ...
s953117785
p01175
C++
#include <fstream> #include <iostream> #include <string> #include <sstream> using namespace std; int main(){ int test; cin >> test; string s; string str[] = {"R1......", "R1.....", "R1....", "R1...", "R1..", "R1.", "R16..", "R16.", "R16", "R1", "R2....." , "R2...." , "R2...", "R2..", "R2.", "R2", "R32.", ...
a.cc: In function 'int main()': a.cc:48:17: error: 'vector' was not declared in this scope 48 | vector<string> vs; | ^~~~~~ a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 4 | #include <sstream> +++ |+#i...
s982624619
p01175
C++
#include<cstdio> #include<string> #include<vector> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; const int INF=1<<29; int NUM[28]; string SYM[28]; int ub; pair< int,vector<string> > dfs(int a,int cur){ // printf("a=%d, ub=%d\n",a,ub); if(a==0){ ub=min(ub,cur); return make_pair(0,vector<string>(...
a.cc: In function 'int main()': a.cc:82:17: error: 'reverse' was not declared in this scope 82 | reverse(S.begin(),S.end()); | ^~~~~~~
s423154228
p01175
C++
// Problem E : Optimal Rest #include <fstream> #include <iostream> #include <string> #include <sstream> using namespace std; int main(){ int test; cin >> test; string s; // ‹x•„•\Œ»‚ðÅŒã‚ÉR‚ð‰Á‚¦‚½ê‡‚ÌŽ«‘‡‚Å‘S’Ê‚è‚ð•À‚ׂ½‚à‚Ì string str[] = {"R1......", "R1.....", "R1....", "R1...", "R1..", "R1.", "R16..", "...
a.cc: In function 'int main()': a.cc:63:17: error: 'vector' was not declared in this scope 63 | vector<string> vs; | ^~~~~~ a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 5 | #include <sstream> +++ |+#i...
s688899669
p01176
C++
#include <cstdio> #include <iostream> #include <sstream> #include <iomanip> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <climits> #include <cfloat> using namespace ...
a.cc: In function 'int solve(int, int, std::bitset<16>)': a.cc:47:21: error: no matching function for call to 'prevSubset(std::bitset<16>&, std::bitset<16>&)' 47 | while(prevSubset(bs1, rest)){ | ~~~~~~~~~~^~~~~~~~~~~ a.cc:21:6: note: candidate: 'template<unsigned int T> bool prevSubset(std::bits...
s990586317
p01178
C++
#include<iostream> #include<vector> #include<map> #include<cmath> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define ALL(C) (C).begin(),(C).end() typedef long long ll; const int N = 100; const int M = 10000; const int ...
a.cc: In function 'void makeupdate(int&, int&, int&, int&, int&, int, int, int, int, int)': a.cc:62:5: error: 'assert' was not declared in this scope 62 | assert(l+r+req == tmp); | ^~~~~~ a.cc:6:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' ...
s726569029
p01178
C++
#include<iostream> #include<vector> #include<map> #include<cmath> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define ALL(C) (C).begin(),(C).end() typedef long long ll; const int N = 100; const int M = 10000; const int ...
a.cc: In function 'void update(int, int, int, int, int, int)': a.cc:32:3: error: 'assert' was not declared in this scope 32 | assert(al <= ar); | ^~~~~~ a.cc:6:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 5 | #include<algorithm> +++ |+#in...
s855157320
p01180
C++
#include<stdio.h> #include<string.h> #include<math.h> double circle[100001][3]; double distance(i,j){ return sqrt((circle[i][0]-circle[j][0])*(circle[i][0]-circle[j][0])+(circle[i][1]-circle[j][1])*(circle[i][1]-circle[j][1])) -circle[i][2]-circle[j][2]; } int main(){ int n,i,j; double min; while(0<=scanf("%d",&n)...
a.cc:7:17: error: 'i' was not declared in this scope 7 | double distance(i,j){ | ^ a.cc:7:19: error: 'j' was not declared in this scope; did you mean 'jn'? 7 | double distance(i,j){ | ^ | jn a.cc:7:20: error: expression list treated as compou...
s217267945
p01180
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<vector> #include<cmath> #define EPS 1e-10 #define F first #define S second #define INF 1<<29 using namespace std; typedef pair<double,double> Pos; typedef pair<Pos,double> P; bool cmp_y(const P &a,const P &b){ return a.F.S < b.F.S; } double rec(P *a,...
a.cc: In function 'int main()': a.cc:65:25: error: cannot convert 'std::vector<std::pair<std::pair<double, double>, double> >' to 'P*' {aka 'std::pair<std::pair<double, double>, double>*'} 65 | printf("%.6f\n",rec(p,N)); | ^ | | | ...
s922349880
p01180
C++
#include<iostream> #include<vector> #include<cmath> #include<cstdio> #include<cstdlib> using namespace std; const int DIFF = 2000; struct Circle{ double x,y,r; bool operator < (const Circle& c) const{ return sqrt(x*x+y*y) < sqrt(c.x*c.x+c.y*c.y); } }; double dist(const Circle& c1, const Circle& c2){ ret...
a.cc: In function 'int main()': a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 28 | sort(V.begin(),V.end()); | ^~~~ | sqrt
s392746377
p01181
C++
$ cat F.cpp #include<bits/stdc++.h> using namespace std; typedef long long ll; ll mahou(vector<ll>); int main(){ while(1){ vector<ll> a(10); vector<ll> nn;///not input vector<ll> nnum(10, false); vector<ll> emp; ll f=0; for(ll i=0;i<10;i++){ cin >> a[i]; assert( -1 <= a[i] && a[i] ...
a.cc:1:1: error: '$' does not name a type 1 | $ cat F.cpp | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:2: /usr/include/c++/14...
s881072318
p01182
C++
#include <iostream> #include <string> #include <map> #include <queue> using namespace std; enum EVENT{ORDER, COOKED}; class Event { public: int c,t,s,id; EVENT e; Event(int c, int t, int s, int id, EVENT e) :c(c),t(t),e(e),s(s),id(id) {} bool operator<(const Event& a) const { if(t!=a.t) return t>a.t; i...
a.cc: In function 'int main()': a.cc:79:25: error: 'sort' was not declared in this scope; did you mean 'short'? 79 | sort(seq.begin(), seq.end()); | ^~~~ | short
s278830868
p01183
C
#include<iostream> #include<cmath> #include<complex> #include<iomanip> using namespace std; typedef complex<double> point; typedef pair<point,point> line; bool makeable(int a, int b, int c) { return a+b>c && b+c>a && c+a>b; } inline double my_pow(int a, double b) { return pow(a, b); } inline double vofh(int a...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s563984083
p01183
C
#include<iostream> #include<cmath> #include<complex> #include<iomanip> #include<cassert> using namespace std; typedef complex<double> point; typedef pair<point,point> line; bool makeable(int a, int b, int c){ return a+b>c && b+c>a && c+a>b; } inline double my_pow(double a, double b){ return pow(a, b); } doubl...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s400001131
p01183
C
#include<iostream> #include<cmath> #include<complex> #include<iomanip> #include<cassert> using namespace std; typedef complex<double> point; typedef pair<point,point> line; bool makeable(int a, int b, int c){ return a+b>c && b+c>a && c+a>b; } inline double my_pow(double a, double b){ return pow(a, b); } doubl...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s201372214
p01183
C++
#include <cstdio> #include <iostream> #include <sstream> #include <iomanip> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <climits> #include <cfloat> using namespace ...
a.cc: In function 'int main()': a.cc:114:26: error: no matching function for call to 'nextBitset(std::bitset<16>&, int&)' 114 | }while(nextBitset(bs, n)); | ~~~~~~~~~~^~~~~~~ a.cc:74:6: note: candidate: 'template<unsigned int T> bool nextBitset(std::bitset<T>&, int)' 74 | bool nextBits...
s601749199
p01183
C++
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include<string> #include<set> #include<vector> #include <sstream> #include <cmath> #include <cstdio> #include <quadmath.h> using namespace std; typedef long double ld; __float128 circumscribed_sphere(__float128 a,__float128 b,__float128 c...
a.cc: In function '__float128 circumscribed_sphere(__float128, __float128, __float128, __float128, __float128, __float128)': a.cc:21:20: error: call of overloaded 'sqrt(__float128)' is ambiguous 21 | __float128 V=sqrt((a2*d2*((b2+e2+c2+f2)-(a2+d2)) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 |...
s627303631
p01183
C++
#include <algorithm> #include<string> #include<set> #include<vector> #include <sstream> #include <cmath> #include <cstdio> #include<cassert> using namespace std; typedef long double ld; ld circumscribed_sphere(ld a,ld b,ld c,ld x,ld y,ld z){ #define sqr(x) ((x)*(x)) ld tv=sqr(a*x)*(sqr(b)+sqr(c)-sqr(a)+sqr(y)+sqr(...
a.cc: In function 'int main()': a.cc:29:9: error: 'cin' was not declared in this scope 29 | while(cin >> N,N){ | ^~~ a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 8 | #include<cassert> +++ |+#include <iostream> 9 |
s805678946
p01183
C++
#include <algorithm> #include<string> #include<set> #include<vector> #include <sstream> #include <cmath> #include <cstdio> #include<cassert> using namespace std; typedef long double ld; ld circumscribed_sphere(ld a,ld b,ld c,ld x,ld y,ld z){ #define sqr(x) ((x)*(x)) ld tv=sqr(a*x)*(sqr(b)+sqr(c)-sqr(a)+sqr(y)+sqr(...
a.cc: In function 'int main()': a.cc:29:9: error: 'cin' was not declared in this scope 29 | while(cin >> N,N){ | ^~~ a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 8 | #include<cassert> +++ |+#include <iostream> 9 |
s970401453
p01184
C++
#include <cstdio> #include <string> #include <map> #include <vector> #include <algorithm> using namespace std; typedef vector<int> lang; vector<lang> people; int N,M,L; bool v[30][30]; bool check(vector<int> ret) { for(int i=0; i<people.size(); i++) { bool g=false; for(int j=0; j<people[i].size(); j++) for(i...
a.cc: In function 'int main()': a.cc:59:17: error: 'memset' was not declared in this scope 59 | memset(v,0,sizeof(v)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <algorithm> +++ |...
s965896930
p01187
C++
#include <iostream> #include <cstdio> #include <vector> #include <list> #include <cmath> #include <fstream> #include <algorithm> #include <string> #include <queue> #include <set> #include <map> #include <complex> #include <iterator> #include <cstdlib> #include <cstring> #include <sstream> #include <stack> #include <cli...
a.cc: In function 'int main()': a.cc:199:9: error: conflicting declaration 'int node' 199 | int node=daySize; | ^~~~ a.cc:179:15: note: previous declaration as 'const int node' 179 | const int node=daySize; | ^~~~ a.cc:200:18: error: increment of read-only variable 'node' ...
s040165601
p01192
C++
int n,c[NAX],T[NAX+1]; int greedy(int); void douteki(int); int main(){ int i,g,j,k,flag=0; k=1; while(1){ flag=0; cin >> n; if(n == 0 )break; for(i=0;i<n;i++){ cin >> c[i]; if(i == 0 && c[i] != 1)flag=1; } if(n == 1 && c[i-1] == 1){ cout << "Case #" << k << ": OK" << ...
a.cc:1:9: error: 'NAX' was not declared in this scope 1 | int n,c[NAX],T[NAX+1]; | ^~~ a.cc:1:16: error: 'NAX' was not declared in this scope 1 | int n,c[NAX],T[NAX+1]; | ^~~ a.cc: In function 'int main()': a.cc:11:5: error: 'cin' was not declared in this scope 11 | cin...
s969788173
p01192
C++
#include<iostream> #include<cstdio> #include<algorithm> #define NAX 1000 using namespace std; int n,c[NAX],T[NAX+1]; int greedy(int); void douteki(int); int main(){ int i,g,j,k,flag=0; k=1; while(1){ flag=0; cin >> n; if(n == 0 )break; for(i=0;i<n;i++){ cin >> c[i]; if(i == 0 && c[...
a.cc:48:19: error: extended character  is not valid in an identifier 48 | douteki(n); @/*100000‰ñ“®“IŒv‰æ–@‚ÆæÃ—~–@‚ŃRƒCƒ“‚̍ŏ¬–‡”‚ð‹‚ß “®“IŒv‰æ–@ < æÃ—~–@ ‚ƂȂÁ‚½‚ç Cannot use greedy algorithm*/ | ^ a.cc:48:20: error: stray '@' in program 48 | douteki(n); @/*100000‰ñ“®...
s398664641
p01192
C++
#include <iostream> #include <vector> #include <map> #include <climits> using namespace std; typedef pair<int,int> P; int n, ans; int t[1002]; vector<P> g[1002]; map<string,int> name; bool used[1002], loop[1002]; int getId(string s){ if(name.find(s) != name.end()){ return name[s]; } int size = name.size();...
a.cc: In function 'void solve()': a.cc:24:3: error: 'memset' was not declared in this scope 24 | memset(used, 0, sizeof(used)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <climits> +++ |+#include <cstring> ...
s901548092
p01192
C++
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; #define MAX_N 50 #define MAX 50001 #define INF 1e9 int n, c[MAX_N]; int getNum(){ int cost[MAX]; memset(cost,0,sizeof(cost)); cost[0] = 1; for(int i = 0 ; i < n ; i++){ for(int j = 0 ; j < MAX-c[i] ; j++){ cost[c[i]+j]...
a.cc: In function 'int getNum()': a.cc:15:3: error: 'memset' was not declared in this scope 15 | memset(cost,0,sizeof(cost)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> ...
s156075243
p01192
C++
#include<iostream> using namespace std; bool cangGreedy(int c[1001]){ int len=c.size(); for(int i=len-1;i>0;i--;){ for(int j=i-1;j>=0;j--){ if(c[i]%c[j]!=0)return false; } } return true; } int main(){ int c[1001]; int Time=0; whwile(1){ Time++; cin>>n; if(n==0)return 0; for(int i=0;i<n;i++){...
a.cc: In function 'bool cangGreedy(int*)': a.cc:6:19: error: request for member 'size' in 'c', which is of non-class type 'int*' 6 | int len=c.size(); | ^~~~ a.cc:8:32: error: expected ')' before ';' token 8 | for(int i=len-1;i>0;i--;){ | ~ ...
s301557544
p01192
C++
#include<iostream> #include<string> using namespace std; bool cangGreedy(int c[1001]){ int len=c.size(); for(int i=len-1;i>0;i--){ for(int j=i-1;j>=0;j--){ if(c[i]%c[j]!=0)return false; } } return true; } int main(){ int c[1001]; int Time=0; whwile(1){ Time++; cin>>n; if(n==0)return 0; for(...
a.cc: In function 'bool cangGreedy(int*)': a.cc:8:19: error: request for member 'size' in 'c', which is of non-class type 'int*' 8 | int len=c.size(); | ^~~~ a.cc: In function 'int main()': a.cc:22:9: error: 'whwile' was not declared in this scope 22 | whwile(1){ | ...
s419135540
p01192
C++
#include<iostream> #include<string> #include<cstring> #include<cstdlib> using namespace std; bool cangGreedy(int c[1001]){ int len=c.size(); for(int i=len-1;i>0;i--){ for(int j=i-1;j>=0;j--){ if(c[i]%c[j]!=0)return false; } } return true; } int main(){ int c[1001]; int n; int Time=0; while(1){ Tim...
a.cc: In function 'bool cangGreedy(int*)': a.cc:9:19: error: request for member 'size' in 'c', which is of non-class type 'int*' 9 | int len=c.size(); | ^~~~ a.cc: In function 'int main()': a.cc:34:20: error: 'cantGreedy' was not declared in this scope; did you mean 'cangGreedy'? ...