submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s026495330
p00718
C++
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> char output[80]; //mcxi•¶Žš—ñ‚©‚琔’l‚ɕϊ·‚·‚é‚̂Ɏg‚¤ŠÖ” int add(char a , int num){ if(a=='m') return (1000*num); if(a=='c') return (100*num); if(a=='x') return (10*num); if(a=='i') return (1*num); return 0; } //”’l‚©‚çmcxi•¶Žš—ñ...
a.cc: In function 'void chengeNum(int)': a.cc:40:33: error: 'itoa' was not declared in this scope 40 | itoa( piyo , str , 10); | ^~~~
s625228464
p00718
C++
#include <iostream> #include <cmath> #include <cstring> #include <cstdio> using namespace std; char MCXI[] = "mcxi"; char mcxi[10]; char* toMCXI(int x) { char str[8]; sprintf(str, "%04d", x); int p = 0; char* c = MCXI; for (int i = 0; i < 4; i++, c++) { int y = str[i] - '0'; if (y == 0) continue; if (y == ...
a.cc: In function 'char* toMCXI(int)': a.cc:22:39: error: expected ';' before '{' token 22 | else(2 <= y && y <= 9) { | ^~ | ;
s759615071
p00718
C++
#include <iostream> #include <cmath> #include <cstring> #include <cstdio> using namespace std; char MCXI[] = "mcxi"; string toMCXI(int x) { string results; char order[] = {'i', 'x', 'c', 'm'}; for (int i = 0; i < 4; i++) { int a = x % 10; if (a != 0) { results.insert(results.begin(), order[i]); if (a ...
a.cc: In function 'int main()': a.cc:65:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 65 | gets(str); | ^~~~ | getw
s210273285
p00718
C++
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); static int n; static String s1, s2; static char[] c = {'m', 'c', 'x', 'i'}; static int[] val = {1000, 100, 10, 1}; static int parse(String str) { int ret = 0; for(int i = 0; i < 4; i++) { int pos = str.indexOf(c[i]); ...
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:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s405907219
p00718
C++
#include <iostream> #include <string> #include <sstream> using namespace std; const string MCXI = "ixcm"; int MCXI2Int(string s) { int res = 0, tmp = 1; for (unsigned int i = 0; i < s.size(); ++i) { if (isdigit(s[i])) { tmp = s[i]-'0'; } else { if (s[i] == 'm') { res += tmp * 1000; } el...
a.cc: In function 'std::string Int2MCXI(int)': a.cc:35:3: error: 'reverse' was not declared in this scope 35 | reverse(res.begin(), res.end()); | ^~~~~~~
s474444740
p00718
C++
ude <iostream> #include <string> using namespace std; int n; int mcxi2int(string str,int pt) { if( pt >= str.size() ) return 0; if( str[pt] >= '2' && str[pt] <= '9' ) pt++; int d; if(str[pt] == 'm') d = 1000; else if(str[pt] == 'c') d = 100; else if(str[pt] == 'x') d = 10; else d = 1; if( pt-1...
a.cc:1:1: error: 'ude' does not name a type 1 | ude <iostream> | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | ...
s041358195
p00718
C++
#include <stdio.h> #include <algorithm> using namespace std; int n; char k[2][9]; void init() { scanf("%d", &n); } bool input() { int i; if (!n) return false; n--; scanf("%s", k[0]); scanf("%s", k[1]); return true; } int main() { int i, j, a, num[2]; init(); while (input()) { a = 1; ...
a.cc: In function 'int main()': a.cc:32:23: error: 'strlen' was not declared in this scope 32 | for (j = 0; j < strlen(k[i]); j++) { | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorith...
s749773552
p00718
C++
#include<iostream> #include<vector> #include<string> #include<cstring> #include<cctype> #include<algorithm> using namespace std; #define INF (1<<29) #define INDEX(s,c) (find(s.begin(),s.end(),c)-s.begin()) char mcxi="mcxi"; int decode(string s){ int i,no=s.size(); int res=0; int m = 1000; for(int i=0;i<4;i++){ i...
a.cc:11:11: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 11 | char mcxi="mcxi"; | ^~~~~~ | | | const char* a.cc: In function 'int decode(std::string)': a.cc:17:37: error: invalid types 'char[int]' for array subscript 17 | int...
s121625511
p00718
C++
#include<iostream> #include<string> using namespace std; int dec(string s) { int ans=0; int co=1; for(int i = 0; i < s.size(); ++i) { if(s[i]=='m') { ans+=co*1000; co=1; } else if(s[i]=='c') { ans+=co*100; co=1; } else if(s[i]=='x') { ans+=co*10; co=1; } else if(s[i]=='i') { ...
a.cc: In function 'std::string enc(int)': a.cc:60:9: error: 'reverse' was not declared in this scope 60 | reverse(ans.begin(),ans.end()); | ^~~~~~~
s561235441
p00718
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s082186019
p00718
C++
#include "MyLib.h" #include "Measure.h" #include <iostream> #include <cstdio> #include <string> #include <vector> #include <stack> #include <deque> #include <queue> #include <set> #include <cmath> #include <algorithm> using namespace std; int main(void) { int n; string a, b, ans; int num1[4], num2[4], nans[4]; in...
a.cc:1:10: fatal error: MyLib.h: No such file or directory 1 | #include "MyLib.h" | ^~~~~~~~~ compilation terminated.
s036021339
p00718
C++
#include <iostream> #include <string> using namespace std; int main(void) { int n; string a, b, ans; int num1[4], num2[4], nans[4]; int ch_point; char ch[4] = {'i', 'x', 'c', 'm'}; bool increase; cin >> n; while(n--) { increase = false; string ans = ""; cin >> a >> b; reverse(a.begin(), a.end()); r...
a.cc: In function 'int main()': a.cc:19:17: error: 'reverse' was not declared in this scope 19 | reverse(a.begin(), a.end()); | ^~~~~~~
s668077654
p00719
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Collections; class Main{ static int kyori[][]; static boolean visited[]; static double answer; static int n, m, b; static Integer tickets[]; public static void main(String args[]){ BufferedReader br = new...
Main.java:73: error: cannot find symbol printArray(distance); ^ symbol: method printArray(Integer[]) location: class Main Main.java:87: error: cannot find symbol printArray(visited); ^ symbol: method printArray(boolean[]) location: class Main 2 errors
s528659850
p00719
C
#include <iostream> #include <algorithm> #define INF 99999999 using namespace std; int main(void){ while(1){ int n, m, p, a, b; cin >> n >> m >> p >> a >> b; if(!n && !m && !p && !a && !b) break; int t[10]={0}; int cost[30][30]; fill(cost[0], cost[29], -1); double dp[(1<<8)+1][30]; fill(dp[0], dp[(1<<8)]...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s076349621
p00719
C
#include <stdio.h> #include <string.h> #define INF 0x3FFFFFFF struct edge{ int x; int y; int z; }; int main(void){ int n, m, p, a, b, t[8], i, j, k, l; double d[30][1 << 8], ans; struct edge e[200]; while(1){ scanf("%d%d%d%d%d",&n,&m,&p,&a,&b); if(n == 0 && m == 0 && p == 0 && a == 0 && b == 0) break; a-...
main.c: In function 'main': main.c:47:9: error: expected declaration or statement at end of input 47 | return 0; | ^~~~~~
s019902042
p00719
C++
#include <cstdio> #include <algorithm> #include <vector> using namespace std; #define INF 2000000000 #define pb push_back int N, M, P, a, b; int t[10]; struct edge { int to; double cost; edge(int to, double cost):to(to), cost(cost){} }; vector<edge> g[40]; double dp[40][1<<8]; double rec(int v, int bit) { if(dp[v][...
a.cc: In function 'int main()': a.cc:58:22: error: 'prinatf' was not declared in this scope; did you mean 'printf'? 58 | else prinatf("%f\n", ans); | ^~~~~~~ | printf
s609829454
p00719
C++
#include<bits/stdc++.h> using namespace std; #define P pair<int,double> #define to first #define cost second #define PB push_back void f(int n,int m,int p,int a,int b){ vector<double> t(n); vector<vector<P>> es(m+1); for(int i=0;i<n;i++){ cin>>t[i]; } for(int i=0;i<p;i++){ int x,y,z; cin>>x>>y...
a.cc: In function 'void f(int, int, int, int, int)': a.cc:38:13: error: 'flag' was not declared in this scope 38 | flag=true; | ^~~~
s446915695
p00719
C++
#include <iostream> #include <algorithm> #include <cstdio> using namespace std; #define INF 10000 #define MAXN 30 #define MAXM 8 int T[MAXN]; int G[MAXM][MAXM]; double dp[MAXM][1 << MAXN]; bool used[MAXM][1 << MAXN]; int n, m, p, a, b; double dijkstra(){ for (int i = 0; i < MAXM; i++) { for (int j = 0; j...
/tmp/ccJfHiNs.o: in function `dijkstra()': a.cc:(.text+0x5d): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccJfHiNs.o a.cc:(.text+0x80): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccJfHiNs.o a.cc:(.text+0x86): relocat...
s392815097
p00719
C++
#include<iostream> #include<algorithm> #include<vector> #include<cstdio> #include<queue> using namespace std; struct Edge{ int to; int cost; Edge(){}; Edge(int _to,int _cost){ to = _to; cost = _cost; } }; struct Data{ int pos; int tic; double t; Data(){}; Data(int...
a.cc: In function 'int main()': a.cc:73:47: error: no matching function for call to 'min(int&, double&)' 73 | for(int i = 0;i < (1<<8);i++)ans = min(ans,vis[b][i]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from...
s174960587
p00719
C++
#include<cstdio> #include<algorithm> #include<vector> #include<queue> using namespace std; struct edge{int to,cost;}; struct data{ int pos,state; double cost; bool operator>(const data &d)const{ return cost>d.cost; } }; vector<edge>g[32]; const double INF=1e9+7; double d[32][1024]; int t[16]; in...
a.cc: In function 'int main()': a.cc:25:14: error: 'dp' was not declared in this scope; did you mean 'p'? 25 | fill(dp[0],32*1024,INF); | ^~ | p a.cc:34:40: error: template argument 1 is invalid 34 | priority_queue<data,vector<data>,greater<data> >Q; | ...
s779810028
p00719
C++
#include<cstdio> #include<algorithm> #include<vector> #include<queue> using namespace std; struct edge{int to,cost;}; struct data{ int pos,state; double cost; bool operator>(const data &d)const{ return cost>d.cost; } }; vector<edge>g[32]; const double INF=1e9+7; double d[32][1024]; int t[16]; in...
a.cc: In function 'int main()': a.cc:25:16: error: 'dp' was not declared in this scope; did you mean 'p'? 25 | fill_n(dp[0],32*1024,INF); | ^~ | p a.cc:34:40: error: template argument 1 is invalid 34 | priority_queue<data,vector<data>,greater<data> >Q; ...
s539983756
p00719
C++
import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.util.Collections.*; import static java.lang.Math.*; public class Main { int INF = 1 << 28; //long INF = 1L << 62; double EPS = 1e-10; int n, m, p, a, b; int[] t; E[] G; void run() { Scanner sc = new Scanner(System.in...
a.cc:89:17: error: stray '@' in program 89 | @Override | ^ a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import ja...
s233376438
p00719
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; struct Edge { int to; double cost; }; const double INF = 1<<29; ...
a.cc: In function 'int main()': a.cc:34:14: error: 'dp' was not declared in this scope; did you mean 'p'? 34 | fill(dp[0], dp[299]+31, INF); | ^~ | p a.cc:40:31: error: 'crr' was not declared in this scope 40 | int nxt = crr | (1<<k); | ...
s702108008
p00719
C++
#include <iostream> #include <vector> #include <queue> #include <climits> using namespace std; struct Edge { int v, c; Edge() {} Edge(int _v, int _c) : v(_v), c(_c) {} }; using G = vector<vector<Edge>>; using P = pair<double, pair<int, int>>; double dijkstra(G& g, vector<int>& t, int a, int b) { priority_queue<...
a.cc: In function 'double dijkstra(G&, std::vector<int>&, int, int)': a.cc:21:67: error: 'INT32_MAX' was not declared in this scope 21 | vector<vector<double>> d(g.size(), vector<double>(1 << 8, INT32_MAX)); | ^~~~~~~~~ a.cc:5:1: note: '...
s831423146
p00719
C++
#include <cstdio> #define rep(i,a,n) for(int i=a; i<n; i++) using namespace std; const int SIZE = 1 << 10; const int MAXV = 40; const int MAXN = 10; const double INF = 1e9; int N, M, P, A, B; double t[MAXN], dist[MAXV][MAXV]; double dp[SIZE][MAXV]; int main() { while(~scanf("%d%d%d%d%d", &N, &M, &P, &A, &B)) { ...
a.cc: In function 'int main()': a.cc:38:40: error: 'min' was not declared in this scope; did you mean 'main'? 38 | dp[nbit][to] = min(dp[nbit][to], dp[bit][j] + cost); | ^~~ | main a.cc:41:34: error: 'mi...
s409557553
p00719
C++
#include <iostream> #include <tuple> #include <set> #include <vector> #include <deque> typedef std::tuple<int, int, double> T; std::vector<T> dis_city; std::deque<double> dis; std::vector<int> flag; std::vector<int> num_basya; int n, m, p, a, b; double search(int ima) { if ( num_basya.size() < dis.size() ) { retu...
a.cc: In function 'double search(int)': a.cc:23:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 23 | std::sort(d.begin(), d.end()); | ^~~~ | qsort a.cc: In function 'int main()': a.cc:65:22: error: 'sort' is not a member of 'std'...
s058323278
p00719
C++
#include <iostream> #include <tuple> #include <set> #include <vector> #include <deque> typedef std::tuple<int, int, double> T; std::vector<T> dis_city; std::deque<double> dis; std::vector<int> flag; std::vector<int> num_basya; int n, m, p, a, b; double cost[2][2][2][2][2][2][2][2][30][30]; std::vector<std::tuple<int...
a.cc: In function 'int main()': a.cc:125:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 125 | std::sort(num_basya.begin(), num_basya.end()); | ^~~~ | qsort a.cc:143:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'...
s850907904
p00719
C++
#include <assert.h> #include <algorithm> #include <complex> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <list> #include <map> #include <ostream> #include <queue> #include <set> #include <sstream> #includ...
a.cc: In function 'int main()': a.cc:60:19: error: 'memset' was not declared in this scope 60 | rep(i,40) memset(g[i],-1,sizeof(g[i])); | ^~~~~~ a.cc:24:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 23 | #include <utilit...
s743768811
p00719
C++
#include <assert.h> #include <algorithm> #include <complex> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <list> #include <map> #include <ostream> #include <queue> #include <set> #include <sstream> #includ...
a.cc: In function 'int main()': a.cc:60:19: error: 'memset' was not declared in this scope 60 | rep(i,40) memset(g[i],-1,sizeof(g[i])); | ^~~~~~ a.cc:24:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 23 | #include <utilit...
s968909625
p00719
C++
#include <iostream> #include <tuple> #include <set> #include <vector> #include <deque> #include <queue> typedef std::tuple<int, int, double> T; std::vector<T> dis_city; std::vector<int> num_basya; int n, m, p, a, b; std::vector<std::tuple<int,int>> table; double cost[1<<8][30]; double search() { for ( int i = 0; ...
a.cc: In function 'int main()': a.cc:68:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 68 | std::sort(num_basya.begin(), num_basya.end()); | ^~~~ | qsort
s376341700
p00719
C++
#include <iostream> #include <tuple> #include <set> #include <vector> #include <deque> #include <queue> typedef std::tuple<int, int, double> T; std::vector<T> dis_city; std::vector<int> num_basya; int n, m, p, a, b; std::vector<std::tuple<int,int>> table; double cost[1<<8][30]; double search() { for ( int i = 0; ...
a.cc: In function 'int main()': a.cc:68:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 68 | std::sort(num_basya.begin(), num_basya.end()); | ^~~~ | qsort
s682996560
p00719
C++
#define rrep(i,n) for(int i=n-1;i>=0;i--) #define REP(i,a,b) for(int i=(a);i<int(b);i++) #define all(x) (x).begin(),x.end() #define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<long long>vll; typedef pair<int,int> p...
a.cc:11:9: error: 'vector' does not name a type 11 | typedef vector<int> vi; | ^~~~~~ a.cc:12:9: error: 'vector' does not name a type 12 | typedef vector<long long>vll; | ^~~~~~ a.cc:13:9: error: 'pair' does not name a type 13 | typedef pair<int,int> pi; | ^~~~ a.cc:22...
s163270460
p00719
C++
#include<iostream> #include <list> #include<stack> #include<queue> #include <vector> #include <set> #include<algorithm> #include<math.h> #include<stdlib.h> #include<string> #include <functional> #include<fstream> #define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++) #define REP(i,n) FOR((i),0,(n)) #define LL long long #de...
a.cc: In member function 'double Stage::search_route(std::vector<int>)': a.cc:88:17: error: 'unique_ptr' was not declared in this scope 88 | unique_ptr<double[]> time(new double[m]), willTime(new double[m]); | ^~~~~~~~~~ a.cc:13:1: note: 'std::unique_ptr' is defined in header '<...
s937401850
p00719
C++
//1444 #include<cstdio> #include<cstdlib> #include<cmath> #include<cassert> #include<sstream> #include<iostream> #include<string> #include<vector> #include<queue> #include<set> #include<map> #include<utility> #include<numeric> #include<algorithm> #include<bitset> #include<complex> using namespace std; typedef unsigne...
a.cc: In function 'int main()': a.cc:66:17: error: 'memset' was not declared in this scope 66 | memset(prev,-1,sizeof(prev)); | ^~~~~~ a.cc:18:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 17 | #include<complex> ...
s702546057
p00719
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: In function 'int num()': a.cc:45:18: error: '_ch' was not declared in this scope; did you mean '__ch'? 45 | while(!isdigit(_ch=getchar()); | ^~~ | __ch a.cc:45:32: error: expected ')' before ';' token 45 | while(!isdigit(_ch=getchar()); | ~ ...
s103401110
p00719
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:68:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 68 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:71:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 71 | gets(str);pos=0; | ^~~~ | getw
s514125327
p00719
C++
#include<iostream> #include<queue> using namespace std; int n,m,p,a,b; int t[8]; struct edge{ int x,y,cost; }; struct state{ int x,nt; double ncost; }; bool operator < (state a,state b){ return a.ncost>b.ncost; } void solve(){ double ans=1000000; for(int i=0;i<n;i++){ scanf("%d",&t[i]); } edge e[1000]; ...
a.cc: In function 'void solve()': a.cc:38:9: error: 'memset' was not declared in this scope 38 | memset(total,-1,sizeof(total)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<queue> +++ |+#include <...
s574606034
p00719
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<queue> #define EPS 1e-9 using namespace std; typedef pair<int,int> P; typedef pair<double,P> P2; double d[50][1<<10]; int main(){ int n,m,p,a,b; int x,y,z; int t[10]; vector<P> g[50]; while(cin >> n >> m >> p >> a >> b, n||m...
a.cc: In function 'int main()': a.cc:53:13: error: return-statement with no value, in function returning 'int' [-fpermissive] 53 | return; | ^~~~~~
s148259919
p00719
C++
#include<iostream> #include<vector> #include<algorithm> #include<cstdio> #define INF (1<<29) using namespace std; int main(void){ int n,m,p,a,b,x,y,z,in; double dp[(1<<8)][31],graph[31][31]; vector<int>t; while(cin >> n >> m >> p >> a >> b){ if(!(n|m|p|a|b))break; t.clear(); fil...
a.cc: In function 'int main()': a.cc:48:6: error: expected '}' at end of input 48 | } | ^ a.cc:16:38: note: to match this '{' 16 | while(cin >> n >> m >> p >> a >> b){ | ^ a.cc:48:6: error: expected '}' at end of input 48 | } | ^ a.cc:1...
s736963701
p00719
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int n, m, p, a, b; while(true) { cin >> n >> m >> p >> a >> b; if( !m && !n && !p && !a && !b ) { break; } vector< vector< double > > dp(1 << n, vector< double >(m + 1,INT_MAX / 4)); vector...
a.cc: In function 'int main()': a.cc:18:78: error: 'INT_MAX' was not declared in this scope 18 | vector< vector< double > > dp(1 << n, vector< double >(m + 1,INT_MAX / 4)); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is define...
s957268311
p00719
C++
#include <iostream> #include <vector> #include <string> #include <queue> #define INF 10000000 using namespace std; typedef pair<int,int> P; vector< vector<int> > dist;//道のりvectorが入っているvector int n,m,p,a,b; int t[8]; int map[30][30]; void rec(vector<int> vec,int pos){ if(pos==b){ dist.push_back(vec); }else if(...
a.cc: In function 'int main()': a.cc:38:5: error: 'memset' was not declared in this scope 38 | memset(map,0,sizeof(map)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> +++ |+#include <cstring> 5...
s806455908
p00720
C++
#include <iostream> #include <string> #include <vector> #include <queue> #include <algorithm> #include <iterator> #include <tuple> using namespace std; typedef tuple<double, int, int> tdii; struct Route { vector<double> t, vx, vy, x, y; explicit Route(int n = 0) : t(n), vx(n), vy(n), x(n), y(n) { } }; vector<double...
a.cc: In function 'int main()': a.cc:102:60: error: 'sqrt' was not declared in this scope 102 | t0 = (-b - sqrt(d)) / (2 * a); | ^~~~
s598543764
p00720
C++
Unacceptable submission
a.cc:1:1: error: 'Unacceptable' does not name a type 1 | Unacceptable submission | ^~~~~~~~~~~~
s223093713
p00720
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(a) (a).begin(),(a).end() #define EQ(a,b) (abs((a)-(b)) < EPS) using namespace std; typedef long double D; typedef complex<D> P; typedef pair<int,int> pii; typedef pair<D, pii> data; typedef vector<int> vi; const D EPS = 1e-10; const D PI ...
a.cc: In function 'int main()': a.cc:104:16: error: template argument 1 is invalid 104 | vector<data> event; | ^ a.cc:104:16: error: template argument 2 is invalid a.cc:108:15: error: request for member 'push_back' in 'event', which is of non-class type 'int' 108 | event.push_back(d...
s485234791
p00721
C++
#include<iostream> #include<algorithm> #include<queue> #include<mpi.h> #include<cstring> using namespace std; #define INF (1 << 29) typedef pair< int , int > Pi; int h, w; char mas[50][50]; int graph[11][11]; int min_cost[50][50]; Pi gomi[11], st, gl; int gomi_size, uoo; int memo[12][1 << 11]; const int dy[] = { 1, 0,...
a.cc:4:9: fatal error: mpi.h: No such file or directory 4 | #include<mpi.h> | ^~~~~~~ compilation terminated.
s175145886
p00721
C++
#include <iostream> #include <string> #include <vector> #include <queue> #include <tuple> using namespace std; #define rep(i, n) for(int i=0; i<(n); ++i) #define all(c) (c).begin(), (c).end() const int inf = 1 << 28; const int dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1}; int w, h; inline bool inrect(int x, int y){ ...
a.cc: In function 'int solve(std::vector<std::__cxx11::basic_string<char> >&)': a.cc:45:12: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, const int&)' 45 | if(find(all(costs[0]), inf) != costs[0].end())return -1; | ~~~~^~~~~~~~~~~~~~~~~~~~ In f...
s362799577
p00721
C++
#include <iostream> #include <string> #include <vector> #include <queue> #include <cstring> using namespace std; #define loop(i,a,b) for(int i=(a);i<int(b);i++) #define rep(i,b) loop(i,0,b) #define all(c) (c).begin(), (c).end() int const inf = 1 << 29; int main(){ int w, h; while (cin >> w >> h && w | h){ ...
a.cc: In function 'int main()': a.cc:65:18: error: 'next_permutation' was not declared in this scope 65 | } while (next_permutation(idx + 1, idx + node.size())); | ^~~~~~~~~~~~~~~~
s278275293
p00721
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<ll,ll> pii; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define all(a) (a).begin(),(a).end() #define pb push_back #define INF (int)(999999999/2) #define eps 1e-9 #define MAX_N 5000 int w,h; int fie[30][30]; string data[30]; void bfs(int ...
a.cc: In function 'void bfs(int, int)': a.cc:29:46: error: reference to 'data' is ambiguous 29 | if(ddy<0||ddx<0||ddy>=h||ddx>=w||data[ddy][ddx]=='x'||used[ddy][ddx])continue; | ^~~~ In file included from /usr/include/c++/14/string:53, f...
s149544521
p00721
C++
#include <iostream> #include <tuple> #include <vector> #include <queue> char stage[20][20]; int cost[1024][10]; int dis[10][10]; int w, h; typedef std::tuple<int, int, int> T; std::vector<T> pos_to_num; long long unsigned PopCount(long long unsigned x) { x = (x & 0x5555555555555555ULL) + ((x & 0xAAAAAAAAAAAAAAAAULL...
a.cc: In function 'int main()': a.cc:105:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 105 | std::sort(table.begin(), table.end()); | ^~~~ | qsort
s106263521
p00721
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <chrono> #include <queue> #include <functional> using namespace std; #define INF 1e9 //???????????? class Timer { chrono::high_resolution_clock::time_point start, end; double limit; public: Timer() { start = chrono::high_resol...
a.cc: In function 'int main()': a.cc:168:41: error: cannot bind non-const lvalue reference of type 'std::vector<bool>&' to an rvalue of type 'std::vector<bool>' 168 | STAT[0].push(STATUS(0,0,vector<bool>(cnt))); | ^~~~~~~~~~~~~~~~~ a.cc:66:49: note: init...
s436810866
p00721
C++
#include <iostream> #include <vector> #include <map> #include <queue> using namespace std; const int INF = 100000000; int dx[] = {1,0,-1,0}, dy[] = {0,1,0,-1}; bool in_range(int a, int b){ return a >= 0 && a < b;} void bfs(map<int,int> &M, vector<int> &G, vector<string> C, int s){ int h = C.size(), w = C[0].length(...
a.cc: In function 'int main()': a.cc:70:12: error: 'next_permutation' was not declared in this scope 70 | }while(next_permutation(V.begin(),V.end())); | ^~~~~~~~~~~~~~~~
s883315847
p00721
C++
#include<iostream> #include<string> #include<queue> using namespace std; using P = pair<int, int>; int w, h, m; string map[20]; int d[20][20][20][20]; P dirty[20]; int diri[] = {-1, 0, 1, 0}; int dirj[] = {0, -1, 0, 1}; void bfs(int si, int sj) { for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) ...
a.cc: In function 'void solve()': a.cc:73:5: error: 'sort' was not declared in this scope; did you mean 'short'? 73 | sort(dirty, dirty + m); | ^~~~ | short a.cc:92:14: error: 'next_permutation' was not declared in this scope 92 | } while (next_permutation(dirty, dirty + m)); | ...
s040120275
p00721
C++
#include <iostream> #include <stdio.h> #include <algorithm> #include <queue> using namespace std; struct Point { int y; int x; int cost; Point() {;} Point(int y1, int x1, int c) : y(y1), x(x1), cost(c) {;} }; int width; int height; char str[100]; char tile[30][30]; int dist[11][10]; int dirty_y[10]; int d...
a.cc: In function 'int main()': a.cc:66:5: error: 'memset' was not declared in this scope 66 | memset(dist, -1, sizeof(dist)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> +++ |+#include <cstring> ...
s521380442
p00721
C++
#include <iostream> #include <string> #include <queue> using namespace std; const int INF = 9999999; int w, h; string b[20]; int d[20][20]; char dx[] = {-1,1,0,0}; char dy[] = {0,0,-1,1}; void dist(int sx, int sy){ for(int i=0;i<20;i++) for(int j=0;j<20;j++) d[i][j] = INF; queue< pair<int,int> > qu; qu.pus...
a.cc: In function 'int main()': a.cc:51:17: error: 'memset' was not declared in this scope 51 | memset(c,0,sizeof(c)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#in...
s197016120
p00721
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<deque> #include<queue> using namespace std; int main(){ int h,w; while(scanf("%d%d\n",&w,&h),w+h){ char board[22][22]={{0}}; deque<pair<int,int> > pos; int count=3; for(int i=1;i<=h;i++){ gets(&board[i][1]); for(int j=1;j...
a.cc: In function 'int main()': a.cc:16:7: error: 'gets' was not declared in this scope; did you mean 'getw'? 16 | gets(&board[i][1]); | ^~~~ | getw
s092576262
p00721
C++
#include <iostream> #include <string> #include <queue> using namespace std; int w, h; string b[20]; int step[20][20]; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; void bfs(int x, int y){ memset(step, -1, sizeof(step)); queue< pair<int, int> > qu; qu.push(make_pair(x,y)); step[x][y] = 0; while(!qu.empty()...
a.cc: In function 'void bfs(int, int)': a.cc:15:9: error: 'memset' was not declared in this scope 15 | memset(step, -1, sizeof(step)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#in...
s073114197
p00721
C++
#include <iostream> #include <string> #include <queue> #include <algorithm> using namespace std; int w, h; string b[20]; int step[20][20]; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; void bfs(int x, int y){ memset(step, -1, sizeof(step)); queue< pair<int, int> > qu; qu.push(make_pair(x,y)); step[x][y] = ...
a.cc: In function 'void bfs(int, int)': a.cc:16:9: error: 'memset' was not declared in this scope 16 | memset(step, -1, sizeof(step)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |...
s473782760
p00721
C++
#include <iostream> #include <string> #include <queue> using namespace std; const int INF = 9999999; int w, h; string b[20]; int d[20][20]; char dx[] = {-1,1,0,0}; char dy[] = {0,0,-1,1}; void dist(int sx, int sy){ for(int i=0;i<20;i++) for(int j=0;j<20;j++) d[i][j] = INF; queue< pair<int,int> > qu; qu.pu...
a.cc: In function 'int main()': a.cc:52:17: error: 'memset' was not declared in this scope 52 | memset(c,0,sizeof(c)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> +++ |+#in...
s514647540
p00721
C++
#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 <cfloat> using namespace std; int INF = INT_MAX / 4; int cal...
a.cc:18:11: error: 'INT_MAX' was not declared in this scope 18 | int INF = INT_MAX / 4; | ^~~~~~~ a.cc:16:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 15 | #include <cfloat> +++ |+#include <climits> 16 | using namespace std;
s358000196
p00721
C++
#include<iostream> #define MAX_V 20 #define INF 10000000 #include<queue> #include<string> #include<map> #include<vector> using namespace std; struct edge{ int to,cost; }; int co[MAX_V][MAX_V]; int h,w,V,dx[]={0,0,1,-1},dy[]={1,-1,0,0}; string s[1000]; typedef pair<int,int> P; map<P,int> mp; int dp[1 << MAX_V][MAX_V]; ...
a.cc: In function 'void solve()': a.cc:33:9: error: 'memset' was not declared in this scope 33 | memset(dp,-1,sizeof(dp)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<map> +++ |+#include <cstring>...
s974759866
p00721
C++
#include <iostream> #include <vector> #include <string> using namespace std; struct P{ int x,y; } s; int w, h; int dx[] = {0,0,1,-1}; int dy[] = {1,-1,0,0}; int to[12][12]; int cnt[21][21]; string f[21]; void solve(int x, int y, int cnt_,int from ,vector<struct P>& vc){ for(int i=0 ; i<4 ; i++ ){ int mx = x + d...
a.cc: In function 'int main()': a.cc:102:25: error: 'next_permutation' was not declared in this scope 102 | }while( next_permutation( vc_.begin() , vc_.end() ) && flag ); | ^~~~~~~~~~~~~~~~
s653534574
p00721
C++
#include <iostream> #include <vector> #include <queue> using namespace std; struct Point { int x, y; Point(int x, int y) : x(x), y(y) {;} }; typedef pair<int, Point> State; int W, H, C, INF = (1 << 22); vector<Point> pos; char field[20][20]; int dist[11][11]; int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0...
a.cc: In function 'void solve()': a.cc:91:3: error: 'memset' was not declared in this scope 91 | 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 <queue> +++ |+#include <cstring> 4 ...
s001809797
p00721
C++
#include <iostream> #include <vector> #include <queue> #include <cstdlib> using namespace std; struct Point { int x, y; Point(int x, int y) : x(x), y(y) {;} }; typedef pair<int, Point> State; int W, H, C, INF = (1 << 22); vector<Point> pos; char field[20][20]; int dist[11][11]; int dx[4] = {0, 1, 0, -1}, d...
a.cc: In function 'void solve()': a.cc:92:3: error: 'memset' was not declared in this scope 92 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <cstdlib> +++ |+#include <cstring> ...
s700898764
p00721
C++
#include<iostream> #include<queue> #include<algorithm> #define MAX 20 #define DMAX 10 using namespace std; class Point{ public: int y, x; Point(){} Point( int y, int x ): y(y), x(x){} bool operator == ( const Point &p ) const{ return ( x == p.x && y == p.y ); } }; int W, H; char G[MAX]...
a.cc: In function 'int bfs(Point, Point)': a.cc:34:23: error: 'INT_MAX' was not declared in this scope 34 | d[i][j] = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include<algorit...
s082663521
p00721
C++
#include<iostream> #include<queue> #include<algorithm> #define MAX 20 #define DMAX 10 using namespace std; class Point{ public: int y, x; Point(){} Point( int y, int x ): y(y), x(x){} bool operator == ( const Point &p ) const{ return ( x == p.x && y == p.y ); } }; int W, H; char G[MAX]...
a.cc: In function 'int bfs(Point, Point)': a.cc:34:23: error: 'INT_MAX' was not declared in this scope 34 | d[i][j] = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include<algorit...
s938729061
p00721
C++
/********************* AOJ_1140 Cleaning Robot *********************/ #include <iostream> #include <queue> #include <string> using namespace std; //構造体宣言 struct pos{ int x; //座標 int y; int dis; //距離 }; int main(){ int w, h; while(1){ cin >> w >> h; if(w == 0 || h == 0) break; //タイルの初期化 char tile[30][...
a.cc: In function 'int main()': a.cc:52:25: error: 'memcpy' was not declared in this scope 52 | memcpy(bfs, tile, sizeof(bfs)); | ^~~~~~ a.cc:7:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #in...
s612758482
p00721
C++
/********************* AOJ_1140 Cleaning Robot *********************/ #include <iostream> #include <queue> #include <string> #include <cstdio> using namespace std; //構造体宣言 struct pos{ int x; //座標 int y; int dis; //距離 }; int main(){ int w, h; while(1){ cin >> w >> h; if(w == 0 || h == 0) break; //タイルの初期...
a.cc: In function 'int main()': a.cc:53:25: error: 'memcpy' was not declared in this scope 53 | memcpy(bfs, tile, sizeof(bfs)); | ^~~~~~ a.cc:9:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #in...
s198721666
p00721
C++
/********************* AOJ_1140 Cleaning Robot *********************/ #include <iostream> #include <queue> #include <string> #include <string> using namespace std; //構造体宣言 struct pos{ int x; //座標 int y; int dis; //距離 }; int main(){ int w, h; while(1){ cin >> w >> h; if(w == 0 || h == 0) break; //タイルの初期...
a.cc: In function 'int main()': a.cc:53:25: error: 'memcpy' was not declared in this scope 53 | memcpy(bfs, tile, sizeof(bfs)); | ^~~~~~ a.cc:7:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #in...
s288874878
p00722
Java
import java.util.Arrays; import java.util.Scanner; public class Eratosthenes { //途中 int prime[]; void eratosthenes(int max) { prime = new int[max + 1]; Arrays.fill(prime, 1); prime[0] = prime[1] = 0; for (int i = 2; i * i <= max; i++) { if (prime[i] == 1) { for (int j = i * i; j <= max; j += i) { ...
Main.java:4: error: class Eratosthenes is public, should be declared in a file named Eratosthenes.java public class Eratosthenes { ^ 1 error
s470295501
p00722
Java
import java.util.Scanner; public class Main { static boolean sosuu(int s) { if(s == 1) return false; for(int i=2; i*i<=s; i++) { if(s%i == 0) return false; } return true; } public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)) { while(sc.hasNext()) { int a = sc.nex...
Main.java:38: error: class, interface, enum, or record expected import java.util.Scanner; ^ 1 error
s502538615
p00722
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)); int[] prime = new int[1000000]; prime[0] = 1; prime[1] = 1; for(int i=2; i<1000; i++) if(prime[i]==0) for(int j=i*i; j<1000...
Main.java:17: error: cannot find symbol if(a==0 && b==0 && c==0) ^ symbol: variable b location: class Main Main.java:17: error: cannot find symbol if(a==0 && b==0 && c==0) ^ symbol: variable c location: class Main 2 errors
s557750020
p00722
Java
import java.util.*; public class P1141__ { public static void main(String[] args) { int MAX = 1000000; boolean[] p; p = new boolean[MAX+1]; p[0] = p[1] = true; for(int i=2;i<=MAX;i++) if(!p[i]) for(int j=i*2;j<=MAX;j+=i) p[j] = true; Scanner sc = new Scanner(System.in); for(;;) { int a = sc.nextInt()...
Main.java:2: error: class P1141__ is public, should be declared in a file named P1141__.java public class P1141__ { ^ 1 error
s579572353
p00722
C
#include<stdio.h> bool isprime(int n,int k=2){if(n==1){return false;}if(n<k*k){return true;}if(n%k==0){return false;}return isprime(n,k+1);}int main(){int a,d,n,c;while(true){scanf("%d%d%d",&n,&d,&a);if(n==0){break;}c=0;while(c<n){if(isprime(a)){c++;}a+=d;}printf("%d\n",a-d);}}
main.c:2:1: error: unknown type name 'bool' 2 | bool isprime(int n,int k=2){if(n==1){return false;}if(n<k*k){return true;}if(n%k==0){return false;}return isprime(n,k+1);}int main(){int a,d,n,c;while(true){scanf("%d%d%d",&n,&d,&a);if(n==0){break;}c=0;while(c<n){if(isprime(a)){c++;}a+=d;}printf("%d\n",a-d);}} |...
s147229770
p00722
C
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #define MAX 1000000 int main(){ int a,d,c,sosu;; int m=0; int n=0; while(1){ scanf("%d%d%d",&a,&d,&c); if(a==0&&d==0&&c==0){ break; } for(a=a;a<MAX;a+=d){ if(a==1){ continue; } if(a==2){ ...
main.c: In function 'main': main.c:35:12: error: 'pre' undeclared (first use in this function) 35 | if(pre==0){ | ^~~ main.c:35:12: note: each undeclared identifier is reported only once for each function it appears in
s553110246
p00722
C
#include<stdio.h> #include<stdlib.h> #include<math.h> int Prime(int p){ int i,f; f = 0; if(p == 1) return 0; if(p == 2) return 1; if(p % 2 == 0) return 0; for(i=3;i*i <= p;i += 2){ if(p % i == 0) f = 1; } if(f == 0) return 1; else return 0; } int main() { int a,d,n; int i,count; ...
main.c: In function 'main': main.c:28:16: error: implicit declaration of function 'prime'; did you mean 'Prime'? [-Wimplicit-function-declaration] 28 | if(prime(i)) { | ^~~~~ | Prime
s143609623
p00722
C
#include<stdio.h> #include<stdlib.h> #include<math.h> int sosu(int i) { int k; if(i==1) return 0; if(i==2||i==3) return 1; for(k=2;k<=sqrt(i);k++) if(i%k==0) return 0; return 1; } int main() { int a,d,n; int i,j; while(1){ scanf("%d %d %d",&a,&d...
main.c: In function 'main': main.c:25:9: error: 'count' undeclared (first use in this function) 25 | count=0,i=a; | ^~~~~ main.c:25:9: note: each undeclared identifier is reported only once for each function it appears in
s096952857
p00722
C
#include <stdio.h> int main() { long a, d, n; long i, j; int pri[1000000] = {}; pri[2] = 1; pri[3] = 1; for(i = 5; i < 1000000; i+=2) { for(j = 3; j < i; j++){ if(i % j == 0) break; if(i == j + 2) pri[i] = 1; } } while(1) { scanf("%ld %ld %ld", &a, &d, &n); /...
main.c: In function 'main': main.c:23:5: error: 'else' without a previous 'if' 23 | else if(a == 0 && d == 0 && n == 0) | ^~~~
s974855855
p00722
C
#include <stdio.h> #include <math.h> int main(void) { int s=1; int e=1; int d=1; int i; int m; bool result; while(s==0 && e==0 && d==0) { scanf("%s",s); scanf("%s",e); scanf("%s",d); result=true; m = 0; if(s==1) { result=false; ...
main.c: In function 'main': main.c:5:46: error: unknown type name 'bool' 5 | int s=1; int e=1; int d=1; int i; int m; bool result; | ^~~~ main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' ...
s273343013
p00722
C
#include <stdio.h> #include <math.h> #include <stdbool.h> int main(void) { int s=1; int e=1; int d=1; int i; int m; result; while(s==0 && e==0 && d==0) { scanf("%s",s); scanf("%s",e); scanf("%s",d); result=true; m = 0; if(s==1) { ...
main.c: In function 'main': main.c:6:47: error: 'result' undeclared (first use in this function) 6 | int s=1; int e=1; int d=1; int i; int m; result; | ^~~~~~ main.c:6:47: note: each undeclared identifier is reported only once for each function it appears in
s015997052
p00722
C
//#define DEBUG using namespace std; bool prime[1000000] = {0}; int a, d, n; int main(){ for(int i = 2; i < 1000; i++){ if(!prime[i]){ for(int j = i*2; j < 1000000; j+=i){ prime[j] = true; } } } prime[0] = prime [1] = 1; #ifdef DEBUG_prime for(int i = 2; i < 100; i++)if(!prime[i])cout<<i<<endl; #e...
main.c:2:1: error: unknown type name 'using' 2 | using namespace std; | ^~~~~ main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 2 | using namespace std; | ^~~ main.c:4:1: error: unknown type name 'bool' 4 | bool prime[1000000] = {0}; | ^~~~ m...
s589430458
p00722
C
C[1000000]; main(){ int i,j,a,d,n; C[1]=1; for(i=2;i<500000;i++) for(j=i*2;j<1000000;j+=i) C[j]=1; for(;scanf("%d%d%d",&a,&d,&n),n;){ a-=d; for(;n--;){ for(;C[a+=d];); } printf("%d\n",a); } exit(!puts(""));
main.c:1:1: warning: data definition has no type or storage class 1 | C[1000000]; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'C' [-Wimplicit-int] main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:8:14: error: ...
s673290000
p00722
C++
#include <iostream> #include<string> #include<cmath> #include<stack> #include<map> int main() { while(1){ int a,d,n; cin>>a>>d>>n; if(a==0 and d==0 and n==0){break;} num=d*n; anseru=a+num; cout<<anseru; } return 0; }
a.cc: In function 'int main()': a.cc:12:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 12 | cin>>a>>d>>n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Li...
s650281762
p00722
C++
#include <iostream> #include<string> #include<cmath> #include<stack> #include<map> using namespace std; #define NUM 1000001 int main() { //素数チェックに用いるーーーーーーーーー int* table = new int[NUM]; int limit; for(int i=0; i < NUM;i++)table[i] = 1; table[0]=0; table[1]=0; limit = sqrt(NUM); cout<<"limit"<<limit<<endl; for(in...
a.cc: In function 'int main()': a.cc:47:38: error: 'count' was not declared in this scope 47 | if(table[a+(i-1)*d] == 1)count++; | ^~~~~ a.cc:48:16: error: 'count' was not declared in this scope 48 | if(count == n){ | ^~~~~
s654227053
p00722
C++
#include <iostream> #include <cmath> #include <vector> using namespace std; bool isPrime(int a) { bool result = true; for (int i = 2; i < sqrt(a); i += (i == 2 ? 1 : 2)) { if (i>3 && i % 3 == 0) continue; if (a%i == 0) { result = !result; break; } } return result; } int main() { vector<int> prime; p...
a.cc: In function 'int main()': a.cc:31:50: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 31 | vector<int>::iterator prev = find(prime.begin(), prime.end(), a); | ~~~~^~~~~~~~~~~~~~~~~~~~...
s057335122
p00722
C++
#include <iostream> using namespace std; typedef long long ll; bool isPrime(int n) { if (i <= 1) return false; for (int i = 2; i*i <= n; ++i) { if (n % i == 0) { return false; } } return true; } int main() { int a, d, n; while ( cin >> a >> d >> n, a || d || n ) { int cnt = 0; int ans = 0; for (l...
a.cc: In function 'bool isPrime(int)': a.cc:8:13: error: 'i' was not declared in this scope 8 | if (i <= 1) return false; | ^
s130440590
p00722
C++
#include <iostream> #include <stdio.h> #include <string> #include <sstream> #include <vector> #include <stdlib.h> using namespace std; //与えられた数が素数かどうか判定する int isPrime(unsigned long long int x) { if(x == 0) return 0; if(x == 1) return 0; int flg = 1; for(int i = 2; i < (int)sqrt((double)x) + 1; i++) { if(x % i...
a.cc: In function 'int isPrime(long long unsigned int)': a.cc:17:33: error: 'sqrt' was not declared in this scope 17 | for(int i = 2; i < (int)sqrt((double)x) + 1; i++) { | ^~~~
s539329689
p00722
C++
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; #define loop(i,a,b) for(int i=(a);i<ull(b);++i) #define rep(i,n) loop(i,0,n) #define all(a) (a).begin(), (a).end() const double eps = 1e-10; const double pi = acos(-1.0); const double inf = (int)1e8; /*テァツエツ?ヲツ閉ーテ・ツ按、テ・ツョツ?/ const int MA...
a.cc:14:1: error: unterminated comment 14 | /*テァツエツ?ヲツ閉ーテ・ツ按、テ・ツョツ?/ | ^
s667835782
p00722
C++
92809 6709 12037 103 93523 14503 2 899429 5107 412717 22699 25673
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 92809 | ^~~~~
s840999426
p00722
C++
#include <stdio.h> int a, d, n; int m, x; int temp; int main(void) { while(1) { scanf("%d %d %d", &a, &d, &n); if (a == 0) break; m = a; while(n > 0) { temp = 0; if (m > 1) { for (x = 2; x <= m / 2 + 1; x++) { if (m % x == 0) { temp = 1; break; } } if (temp == 0) { n--; ...
a.cc: In function 'int main()': a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:8:1: note: to match this '{' 8 | { | ^
s190552412
p00722
C++
#include <stdio.h> int a, d, n; int m, x; int temp; int main(void) { while(1) { scanf("%d %d %d", &a, &d, &n); if (a == 0) break; m = a; while(1) { temp = 0; if (m > 1) { for (x = 2; x <= m / 2 + 1; x++) { if (m % x == 0) { temp = 1; break; } } if (temp == 0) { n--; ...
a.cc: In function 'int main()': a.cc:32:2: error: expected '}' at end of input 32 | } | ^ a.cc:8:1: note: to match this '{' 8 | { | ^
s207057375
p00722
C++
#include<iostream> using namespace std; int main(){ int a,d,n,so[1000000]={},i,j; so[1]=1; for(i=2;i<1000;i++)if(so[i]==0)for(j=2;i*j<1000000;j++)so[i*j]=1; while(1){ cin>>a>>d>>n; if(n==0)break; j=0; for(i=a;c<n;i+=d)if(so[i]==0)j++; cout<<i-d<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:13: error: 'c' was not declared in this scope 11 | for(i=a;c<n;i+=d)if(so[i]==0)j++; | ^
s325068255
p00722
C++
#include <iostream> bool isprime(int n,int k=2){if(n==1){return false;}if(n<k*k){return true;}if(n%k==0){return false;}return isprime(n,k+1);}int main(){int a,d,n,c;while(true){std::cin>>a>>d>>n;if(n==0){break;}c=0;while(c<n){if(isprime(a)){c++;}a+=d;}std::cout<<a-d<<endl;}}
a.cc: In function 'int main()': a.cc:2:249: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 2 | bool isprime(int n,int k=2){if(n==1){return false;}if(n<k*k){return true;}if(n%k==0){return false;}return isprime(n,k+1);}int main(){int a,d,n,c;while(true){std::cin>>a>>d>>n;if(n==0){break;}c=0;w...
s759298941
p00722
C++
#include<iostream> using namespace std; int a, b, c, i, n; int main() { while (true) { n = 0; cin >> a >> b >> c; if (!a) { break; } while(n<c){ for (i = 2; i <= sqrt(a); i++) { if (a%i == 0) { goto E; } } n++; E:; a += b; } cout << a - b << endl; } }
a.cc: In function 'int main()': a.cc:11:42: error: 'sqrt' was not declared in this scope 11 | for (i = 2; i <= sqrt(a); i++) { | ^~~~
s972941287
p00722
C++
#include<iostream> using namespace std; int a, b, c, i, n; int main() { while (true) { n = 0; cin >> a >> b >> c; if (!a) { break; } while(n<c){ if (a < 2) { goto E; } for (i = 2; i <= sqrt(a); i++) { if (a%i == 0) { goto E; } } n++; E:; a += b; } cout << a - b << ...
a.cc: In function 'int main()': a.cc:14:42: error: 'sqrt' was not declared in this scope 14 | for (i = 2; i <= sqrt(a); i++) { | ^~~~
s240744122
p00722
C++
#include<iostream> #define rep(i,j) for(int i=0;i<(j);i++) #define reps(i,j,k) for(int i=(j);i<=(k);i++) #define fs first #define sc second #define pb push_back using namespace std; #define N 1000000 int inp[N]; int main(){ int a,d,n; inp[0]=inp[1]=1; reps(i,2,N-1){ if(!inp[i])for(int j=i*2;j<N;j+=i)inp[j]=1; ...
a.cc: In function 'int main()': a.cc:25:5: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 25 | cin << a-d << endl; | ~~~ ^~ ~~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:25:5: note: candidate: '...
s105939450
p00722
C++
367 186 151 179 10 203 271 37 39 103 230 1 27 104 185 253 50 85 1 1 1 9075 337 210 307 24 79 331 221 177 259 170 40 269 58 102 0 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 367 186 151 | ^~~
s596059789
p00722
C++
#include<stdio.h> #include<stdlib.h> #include<math.h> int Prime(int p){ int i,f; f = 0; if(p == 1) return 0; if(p == 2) return 1; if(p % 2 == 0) return 0; for(i=3;i*i <= p;i += 2){ if(p % i == 0) f = 1; } if(f == 0) return 1; else return 0; } int main() { int a,d,n; int i,count; ...
a.cc: In function 'int main()': a.cc:28:16: error: 'prime' was not declared in this scope; did you mean 'Prime'? 28 | if(prime(i)) { | ^~~~~ | Prime
s683383122
p00722
C++
#include <bits/stdc++.h> #define INF INT_MAX #define ll long long #define MAX_SIZE 1100000 //??????????????§???+10??? using namespace std; bool is_prime[MAX_SIZE]; //true:?´???°???false:?´???°??\??? //n??\???????´???°?????°????±??????? int sieve(int n){ for(int i = 0;i <= n;i++)is_prime[i] = true; is_prime[0] = ...
a.cc: In function 'int sieve(int)': a.cc:24:1: warning: no return statement in function returning non-void [-Wreturn-type] 24 | } | ^ a.cc: At global scope: a.cc:27:1: error: ISO C++ forbids declaration of 'getNPrimeForProgression' with no type [-fpermissive] 27 | getNPrimeForProgression(int a,int d,int n){...
s985228612
p00722
C++
#include <bits/stdc++.h> #define INF INT_MAX #define ll long long #define MAX_SIZE 1100000 //??????????????§???+10??? using namespace std; bool is_prime[MAX_SIZE]; //true:?´???°???false:?´???°??\??? //n??\???????´???°?????°????±??????? int sieve(int n){ for(int i = 0;i <= n;i++)is_prime[i] = true; is_prime[0] = ...
a.cc: In function 'int sieve(int)': a.cc:24:1: warning: no return statement in function returning non-void [-Wreturn-type] 24 | } | ^ a.cc: In function 'void getNPrimeForProgression(int, int, int)': a.cc:33:17: error: return-statement with a value, in function returning 'void' [-fpermissive] 33 | re...
s009607638
p00722
C++
#include<iostream> #include<algorithm> #include<stack> #include<queue> #include<string> #include<string.h> #include<set> #include<functional> using namespace std; #define INF 1<<21 #define MOD 1000000007 #define MAX 1000000 int main() { int p[MAX]; memset(p, 1, sizeof(p)); p[0] = 0; p[1] = 0; for (int i = 2...
a.cc: In function 'int main()': a.cc:20:24: error: 'sqrt' was not declared in this scope 20 | for (int i = 2; i <= sqrt(MAX)+1; i++) { | ^~~~