submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s204236214
p00713
C++
import java.io.IOException; import java.util.HashMap; import java.util.LinkedList; import java.util.PriorityQueue; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); while(true){ final int n = sc.nextInt(); ...
a.cc:76:5: error: stray '@' in program 76 | @Override | ^ a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.HashMap; ...
s330396152
p00713
C++
#include<cstdio> #include<iostream> #include<vector> #include<complex> #include<algorithm> #include<math> using namespace std; #define reps(i,f,n) for(int i=f;i<int(n);i++) #define rep(i,n) reps(i,0,n) typedef complex<double> Point; const double EPS = 0.000001; int main(){ A:; int n; cin>>n; if(n==0)retu...
a.cc:6:9: fatal error: math: No such file or directory 6 | #include<math> | ^~~~~~ compilation terminated.
s722413241
p00713
C++
# 1 "1132.cpp" # 1 "<built-in>" 1 # 1 "<built-in>" 3 # 175 "<built-in>" 3 # 1 "<command line>" 1 # 1 "<built-in>" 2 # 1 "1132.cpp" 2 #include <bits/stdc++.h> using namespace std; # 1 "./../geometory.cpp" 1 # 1 "geometry.h" # 1 "<command-line>" # 1 "geometry.h" using namespace std; # 1 "point.cpp" 1 typedef comple...
In file included from geometry.h:7, from 1132.cpp:7: circle.cpp:9:7: error: 'OUT' conflicts with a previous declaration In file included from geometry.h:5: polygon.cpp:10:8: note: previous declaration '<unnamed enum> OUT' circle.cpp:9:12: error: 'ON' conflicts with a previous declaration polygon.cpp:10...
s478889950
p00713
C++
#include <bits/stdc++.h> using namespace std; double Dis(double x1, double y1, double x2, double y2); int main(void){ while(1){ int n; int ans = 1; vector< pair<double, double> > p; cin >> n; if(n == 0) break; for(int i=0; i<n; i++){ pair<double, double> t; cin >> t.first >> t.second; p.push_ba...
a.cc: In function 'int main()': a.cc:34:68: error: expected ',' or ';' before ')' token 34 | double d2 = sqrt(1.0 - (d1*d1/4.0))); | ^
s264299576
p00713
C++
#include <bits/stdc++.h> using namespace std; double Dis(double x1, double y1, double x2, double y2); int main(void){ while(1){ int n; int ans = 1; vector< pair<double, double> > p; cin >> n; if(n == 0) break; for(int i=0; i<n; i++){ pair<double, double> t; cin >> t.first >> t.second; p.push_ba...
a.cc: In function 'int main()': a.cc:55:44: error: 'k' was not declared in this scope 55 | if(k == i || k == j || (cx-p[k].first)*(cx-p[k].first) + (cy-p[k].second)*(cy-p[k].second) <= 1.0) cnt++; | ^
s864150787
p00714
Java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import javax.swing.*; import java.awt.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-6; int d; int n; int[] x, h; int m; in...
Main.java:160: error: cannot find symbol v.repaint(); ^ symbol: variable v location: class Main 1 error
s355902565
p00714
C++
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int N,M,L; int B[10],H[10],P[10],T[10]; int flow[11]; //B‚Ì•‚ɏ]‚¤…—Ê B,F,A‚Ɉˑ¶A‚±‚êˆÈ~FA‚ÍŽg‚í‚ê‚È‚¢ double ht[11]; //t•bŒã‚́A‹æØ‚ç‚ꂽ…‘…‚̍‚‚³h void Fill(int l,int r,int in,int &water) { if(water == 0) return ; //…‚ª‚È‚¢ i...
a.cc: In function 'void Fill(int, int, int, int&)': a.cc:39:38: error: 'max_h' was not declared in this scope 39 | double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s); | ^~~~~
s929850506
p00714
C++
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int N,M,L; int B[10],H[10],P[10],T[10]; int flow[11]; //B‚Ì•‚ɏ]‚¤…—Ê B,F,A‚Ɉˑ¶A‚±‚êˆÈ~FA‚ÍŽg‚í‚ê‚È‚¢ double ht[11]; //t•bŒã‚́A‹æØ‚ç‚ꂽ…‘…‚̍‚‚³h void Fill(int l,int r,int in,int &water) { if(water == 0) return ; //…‚ª‚È‚¢ i...
a.cc: In function 'void Fill(int, int, int, int&)': a.cc:39:38: error: 'max_h' was not declared in this scope 39 | double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s); | ^~~~~
s005124846
p00714
C++
#include <iostream> #include <math.h> #include <stdio.h> #include <algorithm> using namespace std; int N,M,L; int B[10],H[10],P[10],T[10]; int flow[11]; //B‚Ì•‚ɏ]‚¤…—Ê B,F,A‚Ɉˑ¶A‚±‚êˆÈ~FA‚ÍŽg‚í‚ê‚È‚¢ double ht[11]; //t•bŒã‚́A‹æØ‚ç‚ꂽ…‘…‚̍‚‚³h void Fill(int l,int r,int in,int &water) { if(water == 0) r...
a.cc: In function 'void Fill(int, int, int, int&)': a.cc:40:38: error: 'max_h' was not declared in this scope 40 | double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s); | ^~~~~
s846965531
p00714
C++
#include <iostream> #include <math.h> using namespace std; int N,M,L; int B[10],H[10],P[10],T[10]; int flow[11]; //B‚Ì•‚ɏ]‚¤…—Ê B,F,A‚Ɉˑ¶A‚±‚êˆÈ~FA‚ÍŽg‚í‚ê‚È‚¢ double ht[11]; //t•bŒã‚́A‹æØ‚ç‚ꂽ…‘…‚̍‚‚³h void Fill(int l,int r,int in,double &water) { if(water == 0) return ; //…‚ª‚È‚¢ if(l != r){ int...
a.cc: In function 'void Fill(int, int, int, double&)': a.cc:38:38: error: 'max_h' was not declared in this scope 38 | double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s); | ^~~~~
s220729990
p00714
C++
#include <iostream> #include <math.h> using namespace std; int N,M,L; int B[10],H[10],P[10],T[10]; int flow[11]; //B‚Ì•‚ɏ]‚¤…—Ê B,F,A‚Ɉˑ¶A‚±‚êˆÈ~FA‚ÍŽg‚í‚ê‚È‚¢ double ht[11]; //t•bŒã‚́A‹æØ‚ç‚ꂽ…‘…‚̍‚‚³h double min(double a,double b) { return (a > b) ? b : a; } void Fill(int l,int r,int in,double &wat...
a.cc: In function 'void Fill(int, int, int, double&)': a.cc:43:38: error: 'max_h' was not declared in this scope 43 | double add_h = (water > s * (max_h - h)) ? (max_h - h) : (water / (double)s); | ^~~~~
s295812044
p00714
C++
#include <iostream> #include <math.h> using namespace std; int N,M,L; int B[10],H[10],P[10],T[10]; int flow[11]; //B‚Ì•‚ɏ]‚¤…—Ê B,F,A‚Ɉˑ¶A‚±‚êˆÈ~FA‚ÍŽg‚í‚ê‚È‚¢ double ht[11]; //t•bŒã‚́A‹æØ‚ç‚ꂽ…‘…‚̍‚‚³h double min(double a,double b) { return (a > b) ? b : a; } void Fill(int l,int r,int in,double &wat...
a.cc: In function 'void Fill(int, int, int, double&)': a.cc:43:38: error: 'max_high' was not declared in this scope 43 | double add_h = (water > s * (max_high - h)) ? (max_high - h) : (water / (double)s); | ^~~~~~~~
s115971877
p00714
C++
#include <iostream> #include <sstream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cassert> using namespace std; #define FOR(i,k,n) for(int i=(k); i<(int)(n);...
a.cc: In function 'int main()': a.cc:56:12: error: 'INT_MAX' was not declared in this scope 56 | H[0] = INT_MAX/4, H[N + 1] = INT_MAX/4; | ^~~~~~~ a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 14 | #include <cassert> +++...
s536454542
p00714
C++
#include <iostream> using namespace std; int full( int height_max, int space, int water ); int main(){ int N, B[100], H[100]; // the number of boards , x position, the height of the board int M, F[100], A[100]; // the number of faucets , x position, the amount of water flow int L, P[100], T[10]; // the numbe...
a.cc: In function 'int main()': a.cc:27:9: error: 'k' was not declared in this scope 27 | for ( k = 0; k < L; k++ ){ | ^ a.cc:28:11: error: 'j' was not declared in this scope 28 | for ( j = 0; j < M; j++ ){ | ^ a.cc:29:13: error: 'i' was not declared in this scope 29 | ...
s932423386
p00715
C++
#include <iostream> #include <string> #include <vector> #include <map> using namespace std; int matrix[200][200] = { { 0 } }; int main(){ while(true){ int N; cin >> N; if(N == 0){ break; } for(int i = 0; i < 200; ++i){ for(int j = 0; j < 200; ++j){ matrix[i][j] = 1000; } } map<string, int> names; w...
a.cc: In function 'int main()': a.cc:48:49: error: 'modified' was not declared in this scope 48 | modified = true; | ^~~~~~~~ a.cc:53:49: error: 'modified' was not declared in this scope 53 | ...
s866237495
p00716
Java
import java.util.Scanner; public class Fortune{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int data = sc.nextInt(); for(int j=0; j<data; j++){ int max = 0; int before = sc.nextInt(); int year = sc.nextInt(); int type_num = sc.nextInt(); for(int i=0; i<type_num;...
Main.java:3: error: class Fortune is public, should be declared in a file named Fortune.java public class Fortune{ ^ 1 error
s146058861
p00716
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { // System.out.println("START"); Scanner scan = new Scanner(System.in); int dataSetNum = scan.nextInt(); // List<DataSet> dataSets = new ArrayList<DataSet>(); ...
Main.java:28: error: reached end of file while parsing } ^ 1 error
s456141452
p00716
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { // System.out.println("START"); Scanner scan = new Scanner(System.in); int dataSetNum = scan.nextInt(); List<DataSet> dataSets = new ArrayList<DataSet>(); fo...
Main.java:47: error: cannot find symbol nextInt(); ^ symbol: method nextInt() location: class DataSet 1 error
s395039544
p00716
Java
package exercise2; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { // System.out.println("START"); int dataSetNum = 4; List<DataSet> dataSets = new ArrayList<DataSet>(); for(int i = 0; i < dataSetNum; i++) ...
Main.java:20: error: cannot find symbol dataSets.add(new DataSet(scan)); ^ symbol: variable scan location: class Main 1 error
s810071392
p00716
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { // System.out.println("START"); dataSets.add(new DataSet()); } static class DataSet { Scanner scan = new Scanner(System.in); int startingMoney; int year...
Main.java:15: error: cannot find symbol dataSets.add(new DataSet()); ^ symbol: variable dataSets location: class Main 1 error
s454517234
p00716
Java
import java.util.*; public class P1135 { Scanner sc ; long si; int y; int t; Str[] type; void run() { sc = new Scanner(System.in); int n=sc.nextInt(); for (int i=0;i<n;i++) { si = sc.nextLong(); y = sc.nextInt(); t = sc.nextInt(); type = new Str[t]; for (int j=0;j<t;j++) type[j] = new St...
Main.java:2: error: class P1135 is public, should be declared in a file named P1135.java public class P1135 { ^ 1 error
s801013360
p00716
Java
import java.util.Scanner; public class Main { /** * @param args */ public static void main(String[] args) { //dirichlet(); fortune(); } public static void fortune(){ Scanner sc = new Scanner(System.in); int numOfData = sc.nextInt(); for(int i = 0; i < numOfData; i++){ int ini = sc.nextInt();...
Main.java:61: error: reached end of file while parsing } ^ 1 error
s004312449
p00716
Java
import java.util.Scanner; /** * Created by Reopard on 2014/05/22. */ public class Main { static Scanner sc = new Scanner(System.in); int initial, year, janre; OhgasFortune(int initial, int year, int janre){ this.initial = initial; this.year = year; this.janre = janre; } ...
Main.java:10: error: invalid method declaration; return type required OhgasFortune(int initial, int year, int janre){ ^ 1 error
s993350202
p00716
C
#include <stdio.h> #include <stdlib.h> float estimate_Tanri(float operatingfund,float rate_of_interest,int period,int fee); float estimate_Fukuri(float operatingfund,float rate_of_interest,int period,int fee); int main(void) { int m; scanf("%d",&m); int i; for(i=0;i<m;i++){ float operatingfund; scanf("%f",&op...
main.c: In function 'main': main.c:35:34: error: subscripted value is neither array nor pointer nor vector 35 | if(result[i]<=tmp){ | ^
s644128537
p00716
C
#include <stdio.h> int main(void){ int m,fund,year,way; int select; double rate; int commission; int interest; int i,j,k; int res; scanf("%d",&m); for(k=0;k<m;k++){ int max[101]={0}; scanf("%d",&fund); scanf("%d",&year); scanf("%d",&way); for(i=0;i<way;i++){ int ...
main.c: In function 'main': main.c:49:10: error: 'result' undeclared (first use in this function) 49 | if(result[i]>max[k]){ | ^~~~~~ main.c:49:10: note: each undeclared identifier is reported only once for each function it appears in main.c:57:19: error: 'max' undeclared (first use in this func...
s515663675
p00716
C
#include <math.h> int main(){ int N,m,y,n,i,R; for(scanf("%d",&n);n--;printf("%d\n",R)){ for(scanf("%d%d%d",&m,&y,&n),r=m,i=0;i<n;i++){ int t, c, i, dm=0; double r; scanf("%d%lf%d",&t,&r,&c); if(t){ //fukuri for(i=0;i<y;i++){ dm=(int)floor(r*m); m=m+dm-c; } }else{ //tanri for(i=...
main.c: In function 'main': main.c:4:13: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | for(scanf("%d",&n);n--;printf("%d\n",R)){ | ^~~~~ main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 1 | #include <math.h> +++ |+#incl...
s884509369
p00716
C
main(N,R,M,m,y,n,t,c,i,d){double r; for(scanf("%d",&N);N--;printf("%d\n",R)){ for(scanf("%d%d%d",&M,&y,&n),R=M;n--;R=m>R?m:R){ if(m=M,d=0,scanf("%d%lf%d",&t,&r,&c),t){ //fukuri for(i=0;i<y;i++){ dm=(int)floor(r*m); m=m+dm-c; } }else{ //tanri for(i=0;i<y;i++){ dm+=(int)floor(r*m); ...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(N,R,M,m,y,n,t,c,i,d){double r; | ^~~~ main.c: In function 'main': main.c:2:1: error: type of 'N' defaults to 'int' [-Wimplicit-int] main.c:2:1: error: type of 'R' defaults to 'int' [-Wimplicit-int] main.c:2:1: error: type of 'M' defaul...
s163865575
p00716
C
main(N,R,M,m,y,n,t,c,i,d){float r;for(scanf("%d",&N);N--;printf("%d\n",R)){for(scanf("%d%d%d",&M,&y,&n),R=M;n--;R=m>R?m:R){if(m=M,d=0,scanf("%d%f%d",&t,&r,&c),t){for(i=0;i<y;i++)m+=(int)(r*m)-c;else{for(i=0;i<y;i++)d+=(int)(r*m),m-=c;m+=d;}exit(0);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(N,R,M,m,y,n,t,c,i,d){float r;for(scanf("%d",&N);N--;printf("%d\n",R)){for(scanf("%d%d%d",&M,&y,&n),R=M;n--;R=m>R?m:R){if(m=M,d=0,scanf("%d%f%d",&t,&r,&c),t){for(i=0;i<y;i++)m+=(int)(r*m)-c;else{for(i=0;i<y;i++)d+=(int)(r*m),m-=c;m+=d;}exit(0...
s845223907
p00716
C
main(N,R,M,m,y,n,t,c,i,d){float r;for(scanf("%d",&N);N--;printf("%d\n",R)){for(scanf("%d%d%d",&M,&y,&n),R=M;n--;R=m>R?m:R)if(m=M,d=0,scanf("%d%f%d",&t,&r,&c),t)for(i=0;i<y;i++)m+=(int)(r*m)-c;else{for(i=0;i<y;i++)d+=(int)(r*m),m-=c;m+=d;}exit(0);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(N,R,M,m,y,n,t,c,i,d){float r;for(scanf("%d",&N);N--;printf("%d\n",R)){for(scanf("%d%d%d",&M,&y,&n),R=M;n--;R=m>R?m:R)if(m=M,d=0,scanf("%d%f%d",&t,&r,&c),t)for(i=0;i<y;i++)m+=(int)(r*m)-c;else{for(i=0;i<y;i++)d+=(int)(r*m),m-=c;m+=d;}exit(0);...
s963029375
p00716
C
#include <stdio.h> int main(void) { int m,n,money,year,system,cost,interest=0,total=0,last=0; int interest2[10],intererst_total=0; double rate; int i,j,k; scanf("%d",&m); for(i=0;i<m;i++){ scanf("%d",&money); scanf("%d",&year); scanf("%d",&n); total=money; for(j=0;j<n;j++){ scanf("%d %lf %d",&system...
main.c: In function 'main': main.c:24:41: error: 'interest_total' undeclared (first use in this function); did you mean 'intererst_total'? 24 | interest_total=interest_total+interest[k]; | ^~~~~~~~~~~~~~ | ...
s913141686
p00716
C++
#include <bits/stdc++.h> using namespace std; typedef struct set { int f; double ir; long int c, d; long int out; }set_t ; int main() { cout.setf(ios::fixed); cout.precision(10); int m; long int init; cin >> m; long int out[m]; for(int i = 0; i < m; i++) { cin >> init; int y, n; ...
a.cc: In function 'int main()': a.cc:35:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 35 | int main() { | ^~ a.cc:35:9: note: remove parentheses to default-initialize a variable 35 | int main() { | ^~ | -- a.cc:35:9: note: or ...
s026355357
p00716
C++
#include <bits/stdc++.h> using namespace std; typedef struct set { int f; double ir; long int c, d; long int out; }set_t ; int main() { cout.setf(ios::fixed); cout.precision(10); int m; long int init; cin >> m; long int out[m]; for(int i = 0; i < m; i++) { cin >> init; int y, n; ...
a.cc: In function 'int main()': a.cc:35:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 35 | int main() { | ^~ a.cc:35:9: note: remove parentheses to default-initialize a variable 35 | int main() { | ^~ | -- a.cc:35:9: note: or ...
s577512271
p00716
C++
loop{ line = gets if line==nil or line =="\n" then break end for i in 1..line.to_i() do amount = gets.to_i() year = gets.to_i() num = gets.to_i() max = 0 for j in 1..num.to_i() do line = gets sp = line.split(nil) r = sp[1].to_f() c = sp[2].to_f() if sp[0] == "1" then last = amount ...
a.cc:8:18: error: too many decimal points in number 8 | for i in 1..line.to_i() do | ^~~~~~~~~~~~ a.cc:13:26: error: too many decimal points in number 13 | for j in 1..num.to_i() do | ^~~~~~~~~~~ a.cc:21:42: error: too many decimal poi...
s780671718
p00717
Java
import java.util.Arrays; import java.util.Scanner; public class Polygonal_Line_Search { static Scanner s = new Scanner(System.in); static class Point { int x=0; int y=0; Point(int x, int y) { this.x = x; this.y = y; } } public static void main...
Main.java:5: error: class Polygonal_Line_Search is public, should be declared in a file named Polygonal_Line_Search.java public class Polygonal_Line_Search { ^ 1 error
s220477272
p00717
Java
import java.util.Scanner; public class QbPolygonalLineSearch { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (run(sc)) {} } static boolean run(Scanner sc) { int n = sc.nextInt(); if (n == 0) { return false; } String k = ""; for (int i = 0; ...
Main.java:3: error: class QbPolygonalLineSearch is public, should be declared in a file named QbPolygonalLineSearch.java public class QbPolygonalLineSearch { ^ 1 error
s082178193
p00717
Java
import java.util.Scanner; public class PolygonalLineSearch { Scanner in = new Scanner(System.in); int n, m; int maxX, maxY, minX, minY; int[][] x; int[][] y; public PolygonalLineSearch() { while (true) { n = in.nextInt(); if (n == 0) break; x = new int[n+1][]; y = new int[n+1][]; for (int i = ...
Main.java:3: error: class PolygonalLineSearch is public, should be declared in a file named PolygonalLineSearch.java public class PolygonalLineSearch { ^ 1 error
s690829836
p00717
Java
import java.io.BufferedReader; import java.io.InputStreamReader; class Main{ static int points0[][]; public static void main(String args[]){ // 標準入力準備 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //Scanner sc = new Scanner(System.in); //String str = new String(); try{ while...
Main.java:38: error: illegal start of expression return compareAsce(points1, points2); || compareDsce(points1, points2); ^ Main.java:42: error: illegal start of expression return compare0(points1, points2); || compare90(points1, points2) || compare180(points1, points2); ...
s238742017
p00717
Java
import java.io.BufferedReader; import java.io.InputStreamReader; class Main{ static int points0[][]; public static void main(String args[]){ // 標準入力準備 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //Scanner sc = new Scanner(System.in); //String str = new String(); try{ while...
Main.java:61: error: unreachable statement for(int i = 0; i < points1.length; i++){ ^ 1 error
s161826556
p00717
Java
import java.io.*; import java.util.*; public class p1136 { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { String line; while(true){ /* input */ line = br.readLine(); int c = Integer.parseInt(line); if(c==0) return; ...
Main.java:4: error: class p1136 is public, should be declared in a file named p1136.java public class p1136 { ^ 1 error
s721596658
p00717
C
#include <iostream> #include <vector> #include <map> #include <algorithm> using namespace std; typedef pair<int,int> P; // デバッグ出力 void debug(vector<P> v, int i){ cout << "Line " << i << endl; for(int i=0 ; i < v.size() ; i++ ){ cout << "(" << v[i].first << "," << v[i].second << ")" << endl; } cout << endl; } i...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s106015667
p00717
C++
#include<iostream> #include<vector> using namespace std; typedef pair<int,int> P; int n; vector<P> t; P change(P p){ return P(-p.second,p.first); } vector<P> ro(vector<P> vec){ while(1){ if(vec[0].first==0&&vec[0].second>0)break; for(int i=0;i<(int)vec.size();i++){ vec[i]=change(vec[i]); } } ...
a.cc: In function 'int main()': a.cc:42:7: error: 'reverse' was not declared in this scope 42 | reverse(v.begin(),v.end()); | ^~~~~~~
s169389315
p00717
C++
#include<bits/stdc++.h> #define range(i,a,b) for(int i = (a); i < (b); i++) #define rep(i,b) range(i,0,b) #define pb(a) push_back(a) #define all(a) (a).begin(), (a).end() #define debug(x) cout << "debug " << x << endl; using namespace std; #define EPS (1e-10) //?\??°??????? #define equals(a, b) ( fabs((a) - (b)) < EPS...
a.cc: In function 'int main()': a.cc:117:22: error: cannot convert 'int (*)[15][2]' to 'int (*)[10][2]' 117 | if(check(line, j, m)){ | ^~~~ | | | int (*)[15][2] a.cc:64:16: note: initializing argument 1 of 'bool check(int (...
s717945307
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,x,...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i, 0, n) #define rep(...) CHOOSE((__VA_...
a.cc: In function 'int main()': a.cc:74:34: error: no match for call to '(main()::<lambda(L&, L&)>) (L&, std::vector<std::complex<double> >)' 74 | if (equal(line, input())) { | ~~~~~^~~~~~~~~~~~~~~ a.cc:63:30: note: candidate: 'main()::<lambda(L&, L&)>' (near...
s779668439
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,x,...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i, 0, n) #define rep(...) CHOOSE((__VA_...
a.cc: In function 'int main()': a.cc:74:34: error: no match for call to '(main()::<lambda(L&, L&)>) (L&, std::vector<std::complex<double> >)' 74 | if (equal(line, input())) { | ~~~~~^~~~~~~~~~~~~~~ a.cc:63:30: note: candidate: 'main()::<lambda(L&, L&)>' (near...
s038256038
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,x,...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i, 0, n) #define rep(...) CHOOSE((__VA_...
a.cc: In function 'int main()': a.cc:74:34: error: no matching function for call to 'equal(L&, L)' 74 | if (equal(line, input())) { | ~~~~~^~~~~~~~~~~~~~~ a.cc:57:6: note: candidate: 'bool equal(L&, L&)' (near match) 57 | bool equal(L& l1, L& l2) { |...
s684314225
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,x,...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i, 0, n) #define rep(...) CHOOSE((__VA_...
a.cc: In function 'int main()': a.cc:74:34: error: no matching function for call to 'equal(L&, L)' 74 | if (equal(line, move(input()))) { | ~~~~~^~~~~~~~~~~~~~~~~~~~~ a.cc:57:6: note: candidate: 'bool equal(L&, L&)' (near match) 57 | bool equal(L& l1, L& l...
s367005069
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,x,...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i, 0, n) #define rep(...) CHOOSE((__VA_...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s149805990
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,x,...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i, 0, n) #define rep(...) CHOOSE((__VA_...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s490569215
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t //#define CHOOSE(a) CHOOSE2 a //#define CHOOSE2(a0,a1,a2,a3,x,...) x //#define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) //#define REP2(i, s, n) REP1(i, s, < signed(n), ++) //#define REP3(i, n) REP2(i, 0, n) //#define rep(...) C...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s808546559
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t //#define CHOOSE(a) CHOOSE2 a //#define CHOOSE2(a0,a1,a2,a3,x,...) x //#define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) //#define REP2(i, s, n) REP1(i, s, < signed(n), ++) //#define REP3(i, n) REP2(i, 0, n) //#define rep(...) C...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s610632564
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t //#define CHOOSE(a) CHOOSE2 a //#define CHOOSE2(a0,a1,a2,a3,x,...) x //#define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) //#define REP2(i, s, n) REP1(i, s, < signed(n), ++) //#define REP3(i, n) REP2(i, 0, n) //#define rep(...) C...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s676430396
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,x,...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i, 0, n) #define rep(...) CHOOSE((__VA_...
a.cc:13:9: warning: "rep" redefined 13 | #define rep(i, n) for(int i = 0; i < n; i++) | ^~~ a.cc:11:9: note: this is the location of the previous definition 11 | #define rep(...) CHOOSE((__VA_ARGS__,REP1,REP2,REP3))(__VA_ARGS__) | ^~~ In file included from /usr/include/c++/14/bits/stl_...
s996835051
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0,a1,a2,a3,x,...) x #define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) #define REP2(i, s, n) REP1(i, s, < signed(n), ++) #define REP3(i, n) REP2(i, 0, n) #define rep(...) CHOOSE((__VA_...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s974915155
p00717
C++
#include "bits/stdc++.h" using namespace std; //#define int int64_t //#define CHOOSE(a) CHOOSE2 a //#define CHOOSE2(a0,a1,a2,a3,x,...) x //#define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal) //#define REP2(i, s, n) REP1(i, s, < signed(n), ++) //#define REP3(i, n) REP2(i, 0, n) //#define rep(...) C...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s549504607
p00717
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; void solve( vector<pair<int, int>> &origin, vector<vector<pair<int, int>>> &target, vector<vector<int>> &results ); bool equal( vector<pair<int, int>> &origin, vector<pair<int, int>> &tmp ); int get_angle( pair<int, ...
a.cc: In function 'bool equal(std::vector<std::pair<int, int> >&, std::vector<std::pair<int, int> >&)': a.cc:81:5: error: 'reverse' was not declared in this scope 81 | reverse( tmp.begin(), tmp.end() ); | ^~~~~~~ a.cc: In function 'int get_angle(std::pair<int, int>, std::pair<int, int>)': a.cc:123:1: w...
s836996831
p00717
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; while (cin >> n, n) { int m0; cin >> m0; vector<int> x0(m0); int x, y, X, Y; for (int i = 0; i < m0; i++) { cin >> X >> Y; if (i > 0) { x0[i] = (x - X) + (y - Y); } x = X; y = Y; } f...
a.cc: In function 'int main()': a.cc:39:50: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)' 39 | }else if (reverse(line.begin, line.end),x0 == line) { | ~~~~...
s088010243
p00717
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; while (cin >> n, n) { int m0; cin >> m0; vector<int> x0(m0); int x, y, X, Y; for (int i = 0; i < m0; i++) { cin >> X >> Y; if (i > 0) { x0[i] = (x - X) + (y - Y); } x = X; y = Y; } f...
a.cc: In function 'int main()': a.cc:39:50: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)' 39 | }else if (reverse(line.begin, line.end),x0 == line) { | ~~~~...
s738045805
p00717
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; while (cin >> n, n) { int m0; cin >> m0; vector<int> x0(m0); int x, y, X, Y; for (int i = 0; i < m0; i++) { cin >> X >> Y; if (i > 0) { x0[i] = (x - X) + (y - Y); } x = X; y = Y; } f...
a.cc: In function 'int main()': a.cc:39:51: error: no matching function for call to 'reverse(<unresolved overloaded function type>, <unresolved overloaded function type>)' 39 | } else if (reverse(line.begin, line.end),x0 == line) { | ~~...
s534111190
p00717
C++
#include <iostream> #include <cmath> #define REP(i, a, n) for(int i = ((int) a); i < ((int) n); i++) #define EPS 1e-10 using namespace std; int N, M[51], X[51][10], Y[51][10]; int len(int i, int j) { return abs(X[i][j] - X[i][j + 1]) + abs(Y[i][j] - Y[i][j + 1]); } int dir(int i, int j) { int x1 = X[i][j + 1] - ...
a.cc: In function 'int main()': a.cc:38:7: error: 'reverse' was not declared in this scope 38 | reverse(X[i], X[i] + M[0]); | ^~~~~~~
s078190969
p00717
C++
#include<iostream> #include<string> using namespace std; string encode() { int m; cin >> m; int x, y; cin >> x >> y; string s = ""; int dirx = 0; int diry = 0; for (int i = 1; i < m; ++i) { int dx, dy; cin >> dx >> dy; dx -= x; dy -= y; int dist...
a.cc: In function 'int main()': a.cc:52:9: error: 'reverse' was not declared in this scope 52 | reverse(rev.begin(), rev.end()); | ^~~~~~~
s867610218
p00717
C++
#pragma GCC optimize ("O3") #pragma GCC target ("avx") #include "bits/stdc++.h" using namespace std; using ll = long long int; #define debug(v) {printf("L%d %s > ",__LINE__,#v);cout<<(v)<<endl;} #define debugv(v) {printf("L%d %s > ",__LINE__,#v);for(auto e:(v)){cout<<e<<" ";}cout<<endl;} #define debuga(m,w) {printf("...
a.cc: In function 'void solve(int)': a.cc:148:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 148 | printer << "+++++\n"; | ^~~~~~~~~ In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bitset:52, ...
s011212017
p00717
C++
#define I(X,C)\ X##xm=X##ym=9999,X##xM=X##yM=-9999;\ for(scanf("%d",&C),i=0;i<C;i++){\ scanf("%d%d",X[i],X[i]+1);\ if(X##xm>X[i][0])X##xm=X[i][0];\ if(X##ym>X[i][1])X##ym=X[i][1];\ if(X##xM<X[i][0])X##xM=X[i][0];\ if(X##yM<X[i][1])X##yM=X[i][1];\ }for(i=0;i<C;i++)X[i][0]-=X##xm,X[i][1]-=X##ym;X##xM-=X##xm,X##...
a.cc:11:1: error: 'm' does not name a type 11 | m[10][2],x[10][2],z[10][2],zz[10][2]; | ^ a.cc:12:1: error: 'rx' does not name a type 12 | rx[4][2]={{1,0},{0,-1},{-1,0},{0,1}}; | ^~ a.cc:13:1: error: 'ry' does not name a type 13 | ry[4][2]={{0,1},{1,0},{0,-1},{-1,0}}; | ^~ a.cc:14:1: error: '...
s665119137
p00717
C++
#include <iostream> #include <complex> #include <cmath> #define MAX_N 60 #define MAX_M 20 using namespace std; #define P complex<int> int main(){ int n, m,mm; P org[MAX_M]; P cmp[MAX_M]; P d, o,c,deg; while( cin>>n && n ){ cin >> mm; for( int i=0;i<mm;i++ ) cin >> org[i].real() >> org[i].ima...
a.cc: In function 'int main()': a.cc:20:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 20 | cin >> org[i].real() >> org[i].imag(); | ~~~ ^~ ~~~~~~~~~~~~~ | | | | | int |...
s627431187
p00717
C++
#include <iostream> #include <complex> #include <cmath> #define MAX_N 60 #define MAX_M 20 using namespace std; #define P complex<int> int main(){ int n, m,mm; P org[MAX_M]; P cmp[MAX_M]; P d, o,c,deg; while( cin>>n && n ){ cin >> mm; for( int i=0;i<mm;i++ ) cin >> org[i].real() >> org[i].ima...
a.cc: In function 'int main()': a.cc:20:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 20 | cin >> org[i].real() >> org[i].imag(); | ~~~ ^~ ~~~~~~~~~~~~~ | | | | | int |...
s683081563
p00717
C++
#include <iostream> #include <vector> #include <cmath> #include <complex> #define PI M_PI using namespace std; typedef complex<int> P; struct l { int n; vector<P> p; }; P rotate(P p, int n) { int x = p.real(), y = p.imag(); return n == 0 ? P(x, y) : n == 1 ? P(-y, x) : n == 2 ? P(y, -x) : ...
a.cc: In function 'int main()': a.cc:49:25: error: 'reverse' was not declared in this scope 49 | reverse( pattern[i+4].p.begin(), pattern[i+4].p.end() ); | ^~~~~~~
s498222329
p00717
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <iostream> #include <sstream> #include <vector> #include <string> #include <queue> #include <set> #include <map> #include <utility> #include <algorithm> #include <functional> #include <complex> using namespace std; #define REP(i,n) for((i)=0;(i)<(int)(n);...
a.cc: In function 'int main()': a.cc:50:43: error: lvalue required as unary '&' operand 50 | REP(i,M) scanf("%d %d",&origin[i].real(),&origin[i].imag()); | ~~~~~~~~~~~~~~^~ a.cc:50:61: error: lvalue required as unary '&' operand 50 | REP(i,M) scanf("%d %d",&origin[i].real...
s266758486
p00717
C++
#include <iostream> #include <complex> #include <vector> using namespace std; #define pb push_back #define rep(i,n) rep2(i,0,n) #define rep2(i,m,n) for(int i=m;i<n;i++) #define sz size() typedef complex<int> P; typedef vector<P> V; int n; bool same(V a,V b){ rep2(i,1,a.sz){ if(a[i]-b[i]!=a[0]-b[0])return 0; } ...
a.cc: In function 'int main()': a.cc:48:33: error: 'reverse' was not declared in this scope 48 | reverse(w.begin(),w.end()); | ^~~~~~~
s114668816
p00717
C++
#include<complex> #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define EPS 1e-10 using namespace std; typedef complex<int> P; const double rad[4] ={0.0,M_PI/2,M_PI,-M_PI/2}; const int Sin[4] = {0,1,0,-1}; const int Cos[4]...
a.cc: In function 'int main()': a.cc:75:18: error: lvalue required as left operand of assignment 75 | cp.real() = p[i][k].real()*Cos[j]-p[i][k].imag()*Sin[j]; | ~~~~~~~^~ a.cc:76:18: error: lvalue required as left operand of assignment 76 | cp.imag() = p[i][k].real()*Sin[j]+p[i...
s978217019
p00717
C++
#include<complex> #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define EPS 1e-10 using namespace std; typedef complex<int> P; const double rad[4] ={0.0,M_PI/2,M_PI,-M_PI/2}; const int Sin[4] = {0,1,0,-1}; const int Cos[4]...
a.cc: In function 'int main()': a.cc:75:18: error: lvalue required as left operand of assignment 75 | cp.real() = p[i][k].real()*Cos[j]-p[i][k].imag()*Sin[j]; | ~~~~~~~^~ a.cc:76:18: error: lvalue required as left operand of assignment 76 | cp.imag() = p[i][k].real()*Sin[j]+p[i...
s936975653
p00717
C++
#include<complex> #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define EPS 1e-10 using namespace std; typedef complex<int> P; const double rad[4] ={0.0,M_PI/2,M_PI,-M_PI/2}; const int Sin[4] = {0,1,0,-1}; const int Cos[4]...
a.cc: In function 'int main()': a.cc:75:18: error: lvalue required as left operand of assignment 75 | cp.real() = p[i][k].real()*Cos[j]-p[i][k].imag()*Sin[j]; | ~~~~~~~^~ a.cc:76:18: error: lvalue required as left operand of assignment 76 | cp.imag() = p[i][k].real()*Sin[j]+p[i...
s885616236
p00717
C++
#include<complex> #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define EPS 1e-10 using namespace std; typedef complex<int> P; const double rad[4] ={0.0,M_PI/2,M_PI,-M_PI/2}; const int Sin[4] = {0,1,0,-1}; const int Cos[4]...
a.cc: In function 'int main()': a.cc:75:18: error: lvalue required as left operand of assignment 75 | cp.real() = (int)(p[i][k].real()*Cos[j]-p[i][k].imag()*Sin[j]); | ~~~~~~~^~ a.cc:76:18: error: lvalue required as left operand of assignment 76 | cp.imag() = (int)(p[i][k].real...
s381696905
p00717
C++
#include<complex> #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define EPS 1e-10 using namespace std; typedef complex<int> P; const double rad[4] ={0.0,M_PI/2,M_PI,-M_PI/2}; const int Sin[4] = {0,1,0,-1}; const int Cos[4] = ...
a.cc: In function 'int main()': a.cc:28:20: error: invalid cast from type 'std::complex<int>' to type 'double' 28 | st = abs((double)(p[i][j]-p[i][j-1]));//要潤 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:30:38: error: invalid cast from type 'std::complex<int>' to type 'double' 30 | ...
s102650114
p00717
C++
#include<complex> #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define EPS 1e-10 using namespace std; typedef complex<int> P; const double rad[4] ={0.0,M_PI/2,M_PI,-M_PI/2}; const int Sin[4] = {0,1,0,-1}; const int Cos[4] = ...
a.cc: In function 'int main()': a.cc:28:28: error: invalid cast from type 'std::complex<int>' to type 'int' 28 | st = (double)abs((int)(p[i][j]-p[i][j-1]));//要潤 | ^~~~~~~~~~~~~~~~~~~~~~~~ a.cc:30:46: error: invalid cast from type 'std::complex<int>' to type 'int' 30 | ...
s692922245
p00717
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; #define pb push_back struct Vector { int x, y; Vector() {} Vector(int x, int y) : x(x), y(y) {} double norm() { return x*x + y*y; } double abs() { return sqrt(x*x + y*y); } }; typedef vector<Vector> vv; Vector ro...
a.cc: In function 'int lcm(int, int)': a.cc:29:16: error: '__gcd' was not declared in this scope 29 | return (a*b)/__gcd(a, b); | ^~~~~
s116296690
p00717
C++
#include<iostream> #include<vector> using namespace std; int main() { int n,m; int s,t; int i,j,flag; vector<int> x,y,a,b,p,q; while(cin>>n,n){ a.clear(); b.clear(); cin>>m; cin>>s>>t; a.push_back(s); b.push_back(t); for(i=0;i<m-1;i++){ cin>>s>>t; a.push_back(s-a[0]); b.push_back(t-b[0]); ...
a.cc: In function 'int main()': a.cc:60:25: error: 'reverse' was not declared in this scope 60 | reverse(x.begin(),x.end()); | ^~~~~~~
s180848955
p00717
C++
#include<iostream> #include<vector> using namespace std; int main() { int n,m; int s,t; int i,j,flag; vector<int> x,y,a,b,p,q; while(cin>>n,n){ a.clear(); b.clear(); cin>>m; cin>>s>>t; a.push_back(s); b.push_back(t); for(i=0;i<m-1;i++){ cin>>s>>t; a.push_back(s-a[0]); b.push_back(t-b[0]); ...
a.cc: In function 'int main()': a.cc:60:25: error: 'reverse' was not declared in this scope 60 | reverse(x.begin(),x.end()); | ^~~~~~~
s601043710
p00717
C++
#include <iostream> #include<algorithm> #define MAX 11 using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int n; while (cin >> n, n){ //初期化 int edge[MAX][2], oppedge[MAX][2], ledge[MAX][2], redge[MAX][2]; int endedge[MAX][2], endoppedge[MAX][2], endledge[MAX][2], endredge[MAX][2]; for (int i = 0; ...
a.cc:7:22: error: '_TCHAR' has not been declared 7 | int _tmain(int argc, _TCHAR* argv[]) | ^~~~~~
s647296846
p00718
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:47: error: invalid method declaration; return type required public static NumbertoMCXI(int a){ ^ Main.java:62: error: <identifier> expected pubilc static int td(char s){ ^ Main.java:70: error: <identifier> expected pubilc static String tc(int s){ ^ 3 errors
s304365401
p00718
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:62: error: <identifier> expected pubilic static int td(char s){ ^ 1 error
s688877908
p00718
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:42: error: cannot find symbol ret+=Math.pos(10,i)*dig[i]; ^ symbol: method pos(int,int) location: class Math Main.java:50: error: cannot find symbol dig[i]=(int)(a/Math.pos(10,i)); ^ symbol: method pos(int,int) location: class Math Main.java:51: error: cannot fi...
s524153732
p00718
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:51: error: cannot find symbol a-=dig[i]*Math.pos(10,i); ^ symbol: method pos(int,int) location: class Math 1 error
s975437796
p00718
Java
import java.util.*; public class P1137 { Scanner sc; void run() { sc = new Scanner(System.in); int n= sc.nextInt(); for (int i=0;i<n;i++) { String str1 = sc.next(); String str2 = sc.next(); int num = str2Num(str1) + str2Num(str2); System.out.println(num2Str(num)); } } int str2Num(String str) ...
Main.java:2: error: class P1137 is public, should be declared in a file named P1137.java public class P1137 { ^ 1 error
s897179508
p00718
Java
import java.io.*; import java.util.*; public class ProblemC { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); for (; N-->0; ) { String x = sc.next(), y = sc.next(); System.out.println(toString(toInt(x) + toInt(y))); } } private static int dd(ch...
Main.java:5: error: class ProblemC is public, should be declared in a file named ProblemC.java public class ProblemC ^ 1 error
s967344027
p00718
Java
import java.util.Scanner; public class Main { Scanner sc; private int parse( String mcxi ){ boolean isNumEntered = false; int mk = 0; int ck = 0; int xk = 0; int ik = 0; int cur = 0; char[] cstr = mcxi.toCharArray(); for( int i = 0; i < cstr.length; i++ ){ switch( cstr[ i ] ){ case 'm': ...
Main.java:74: error: reached end of file while parsing } ^ 1 error
s652116851
p00718
Java
import java.io.*; import java.util.*; public class p1136 { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { String line; /* input */ line = br.readLine(); int n = Integer.parseInt(line); if(n==0) return; for(int k=0;k<n;k+...
Main.java:4: error: class p1136 is public, should be declared in a file named p1136.java public class p1136 { ^ 1 error
s688775912
p00718
C
#include<stdio.h> #include<ctype.h> int main(void) { int ans[4]={}; int coef,k,c,formula; int i,j; scanf("%d%*c",&k); for(i=0;i<k;i++) { coef=1; formula=0; int scale[2][4]={}; while(1) { scanf("%c",&c); if(c==10) { ...
main.c: In function 'main': main.c:44:28: error: expected ':' before 'break' 44 | default | ^ | : 45 | break; | ~~~~~
s118377847
p00718
C
#include<stdio.h> int search(char a[]){ int i,score,box=0; for(i=0;;i++){ if(a[i]=='\0')break; switch(a[i]){ case 'm' :if(a[i-1]>='2'&&a[i-1]<='9'&&i!=0)box+=(a[i-1]-'1')*1000;else box+=1000;break; case 'c' :if(a[i-1]>='2'&&a[i-1]<='9'&&i!=0)box+=(a[i-1]-'1')*100;else box+=100;break; case 'x' :if(a[i-1]>...
main.c: In function 'main': main.c:28:33: error: expected '}' before 'else' 28 | else if(box/1000>0)ans[i]='m'; | ^~~~ main.c:30:33: error: 'else' without a previous 'if' 30 | else if(box/100>0)ans[i]='c'; ...
s715251358
p00718
C++
#include <iostream> #include <typeinfo> #include <cstdlib> #include <string> using namespace std; int main(){ int n; cin >> n; for(int i=0;i<n;i++){ string str1, str2; string ans; cin >> str1 >> str2; int str_i=0, str_x=0, str_c=0, str_m=0; char c1[9],c2[9]; strcpy(c1, str1.c_str()); ...
a.cc: In function 'int main()': a.cc:18:5: error: 'strcpy' was not declared in this scope 18 | strcpy(c1, str1.c_str()); | ^~~~~~ a.cc:4:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cstdlib> +++ |+#include <cstring> ...
s780270248
p00718
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { bool a[1300000]={0}; a[1]=1; for(int i=2;i<650001;i++){ if(a[i]==1) continue; int j=2*i; while(j<1300000){ a[j]=1; j=j+i; } } int k while(cin>>k && k){ int ans; if(a[k]==0) ans=0; else{ int l=k+1,m=k-1; while(a[l]==...
a.cc: In function 'int main()': a.cc:18:1: error: expected initializer before 'while' 18 | while(cin>>k && k){ | ^~~~~
s698851056
p00718
C++
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <string> using namespace std; string itos(int n){ int a,b,c,d; a=n/1000; n=n%1000; b=n/100; n=n%100; c=n/10; c=n%10; d=n; string s=""; if(a>1) s=s+to_string(a); if(a>0) s=s+"m"; if(b>1) s=s+to_string(b); if(b>0) s=s+"c"; if(c>1) s=s+to...
a.cc: In function 'int main()': a.cc:74:13: error: call of overloaded 'stoi(std::string&)' is ambiguous 74 | int ans=stoi(s)+stoi(t); | ~~~~^~~ a.cc:30:5: note: candidate: 'int stoi(std::string)' 30 | int stoi(string s){ | ^~~~ In file included from /usr/include/c++/14/string:54, ...
s029663517
p00718
C++
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <string> using namespace std; string itos(int n){ int a,b,c,d; a=n/1000; n=n%1000; b=n/100; n=n%100; c=n/10; c=n%10; d=n; string s=""; if(a>1) s=s+to_string(a); if(a>0) s=s+"m"; if(b>1) s=s+to_string(b); if(b>0) s=s+"c"; if(c>1) s=s+to...
a.cc: In function 'int main()': a.cc:74:13: error: call of overloaded 'stoi(std::string&)' is ambiguous 74 | int ans=stoi(s)+stoi(t); | ~~~~^~~ a.cc:30:5: note: candidate: 'int stoi(std::string)' 30 | int stoi(string s){ | ^~~~ In file included from /usr/include/c++/14/string:54, ...
s975926589
p00718
C++
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <string> using namespace std; string itos(int n){ int a,b,c,d; a=n/1000; n=n%1000; b=n/100; n=n%100; c=n/10; c=n%10; d=n; string s=""; if(a>1) s=s+to_string(a); if(a>0) s=s+"m"; if(b>1) s=s+to_string(b); if(b>0) s=s+"c"; if(c>1) s=s+to...
a.cc: In function 'int main()': a.cc:74:13: error: call of overloaded 'stoi(std::string&)' is ambiguous 74 | int ans=stoi(s)+stoi(t); | ~~~~^~~ a.cc:30:5: note: candidate: 'int stoi(std::string)' 30 | int stoi(string s){ | ^~~~ In file included from /usr/include/c++/14/string:54, ...
s967138682
p00718
C++
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <vector> #include <stack> #include <queue> #include <set> #include <bitset> #include <map> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> using namespace std; typedef long long ll; typedef pair<int,int> p...
a.cc: In function 'void slove(std::string, std::string)': a.cc:36:62: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)' 36 | if (s[i + 1] == 'm') array[0] += stoi(s[i]); | ...
s459124691
p00718
C++
#include<iostream> #include<string> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) char mcxi[4] = { 'i','x','c','m' }; int decode(string s); string encode(int n); int main() { int sum, n; cin >> n; while (n--) { string s1, s2; cin >> s1 >> s2; sum = decode(s1) + decode(s2); cout << encode(sum) <<...
a.cc: In function 'int decode(std::string)': a.cc:28:49: error: 'pow' was not declared in this scope 28 | sum += coe*(int)pow(10.0, j); | ^~~ a.cc: In function 'std::string encode(int)': a.cc:40:33: error: 'pow' was not declared in...
s549519591
p00718
C++
#include<iostream> #include<string> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) char mcxi[4] = { 'i','x','c','m' }; int decode(string s); string encode(int n); int main() { int sum, n; cin >> n; while (n--) { string s1, s2; cin >> s1 >> s2; sum = decode(s1) + decode(s2); cout << encode(sum) <<...
a.cc: In function 'int decode(std::string)': a.cc:28:49: error: 'pow' was not declared in this scope 28 | sum += coe*(int)pow(10.0, j); | ^~~ a.cc: In function 'std::string encode(int)': a.cc:40:33: error: 'pow' was not declared in...
s275043736
p00718
C++
#include<iostream> #include<string> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) char mcxi[4] = { 'i','x','c','m' }; int decode(string s); string encode(int n); int main() { int sum, n; cin >> n; while (n--) { string s1, s2; cin >> s1 >> s2; sum = decode(s1) + decode(s2); cout << encode(sum) <<...
a.cc: In function 'int decode(std::string)': a.cc:28:49: error: 'pow' was not declared in this scope 28 | sum += coe*(int)pow(10.0, j); | ^~~ a.cc: In function 'std::string encode(int)': a.cc:40:33: error: 'pow' was not declared in...
s855727181
p00718
C++
#include<iostream> #include<string> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) char mcxi[4] = { 'i','x','c','m' }; int decode(string s); string encode(int n); int main() { int sum, n; cin >> n; while (n--) { string s1, s2; cin >> s1 >> s2; sum = decode(s1) + decode(s2); cout << encode(sum) <<...
a.cc: In function 'int decode(std::string)': a.cc:28:49: error: 'pow' was not declared in this scope 28 | sum += coe*(int)pow(10.0, j); | ^~~ a.cc: In function 'std::string encode(int)': a.cc:40:33: error: 'pow' was not declared in...
s094077218
p00718
C++
#include<iostream> #include<string> #include<math.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) char mcxi[4] = { 'i','x','c','m' }; int decode(string s); string encode(int n); int main() { int sum, n; cin >> n; while (n--) { string s1, s2; cin >> s1 >> s2; sum = decode(s1) + decode(s2); cout ...
a.cc:54:1: error: 'Status' does not name a type 54 | Status API Training Shop Blog About | ^~~~~~
s968329139
p00718
C++
#include <string> #include <iostream> using namespace std; void itom(int num){ int a=num/1000; if(a>1)cout<<a; if(a>0)cout<<'m'; num%=1000; a=num/100; if(a>1)cout<<a; if(a>0)cout<<'c'; num%=100; a=num/10; if(a>1)cout<<a; if(a>0)cout<<'x'; num%=10; a=num; if(a>1)cout<<a; if(a>0)cou...
a.cc: In function 'void mtoi(std::string)': a.cc:52:12: error: return-statement with a value, in function returning 'void' [-fpermissive] 52 | return res; | ^~~ a.cc: In function 'int main()': a.cc:62:16: error: void value not ignored as it ought to be 62 | i1=mtoi(s1); | ...
s515282034
p00718
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define shosu(n) setprecision(n) #define ENDL endl using namespace std; int n; string A, B; int f(char c) { if (c == 'm') return 1000; if (c == 'c') return 100; if (c == 'x') return 10; return 1; } int main() { cin >> n; fo...
a.cc: In function 'int main()': a.cc:21:11: error: no match for 'operator+' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 21 | A = 1 + A; | ~ ^ ~ | | | | int std::string {aka std::__cxx11::basic_string<char>} In file included from...