submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s404402377 | p01335 | C++ | #include<iostream>
#include<string>
#include<cstring>
#include<vector>
#include<set>
#include<cmath>
using namespace std;
typedef vector<int> vi;
int main()
{
int buckets[14];
int buckets2[5];
while(1)
{
int n;
cin >> n;
if(!n) break;
int cardscore[14][5];
int handscore[9];
for(int j=... | a.cc: In function 'int main()':
a.cc:88:7: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
88 | sort(tmpc.begin(),tmpc.end());
| ^~~~
| sqrt
|
s909669747 | p01335 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc: In function 'int main()':
a.cc:235:34: error: 'endll' was not declared in this scope
235 | cout<<0<<endll;
| ^~~~~
|
s926198824 | p01335 | C++ | #include<iostream>
using namespace std;
int main()
{
int n;
bool bf=false;
for(;cin>>n;)
{
if(bf)
cout<<endl;
bf=true;
int point[4][13];
for(int i=0;i<4;i++)
for(int j=0;j<13;j++)
cin>>point[i][j];
/*
for(int i=0;i<4;i++,cout<<endl)
for(int j=0;j<13;j++)
cout<<poi... | a.cc: In function 'int main()':
a.cc:71:11: error: 'sort' was not declared in this scope; did you mean 'short'?
71 | sort(card,card+5);
| ^~~~
| short
|
s582079217 | p01336 | Java | import java.util.Arrays;
import java.util.Scanner;
import p2219.Main.Unit;
public class Main2 {
static int N,M;
static int[][] idol;
static int[][] dp;
static int rank,ability;
public static void main(String[] args) {
Scanner cin=new Scanner(System.in);
for(;;){
String NM=cin.nextLine();
N=Integer.par... | Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
Main.java:4: error: package p2219.Main does not exist
import p2219.Main.Unit;
^
2 errors
|
s259785382 | p01336 | Java | import java.util.*;
public class AOJ_2219{
void run(){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int N = sc.nextInt();
int M = sc.nextInt();
int[] cost = new int[N];
int[][] rank = new int[3][N];
for(int i = 0; i < N; i++){
... | Main.java:2: error: class AOJ_2219 is public, should be declared in a file named AOJ_2219.java
public class AOJ_2219{
^
1 error
|
s978749557 | p01336 | C++ | #include<bits/stdc++.h>
using namespace std;
/* 変数名を被らせない
デバッグコードを取り除く */
#define ANSWER(x) cout<<x<<endl
#define debug(x) cout<<#x<<": "<<x
const int MAX_INT = 1000000;
string name;
int C[301],V[301],D[301],L[3--];
int dp[301][301][3];
int N,M;
int solve(int a,int b,int s);
int main(){
while(cin >> N >> M){
m... | a.cc:9:28: error: lvalue required as decrement operand
9 | int C[301],V[301],D[301],L[3--];
| ^
a.cc: In function 'int main()':
a.cc:19:38: error: 'L' was not declared in this scope
19 | cin >> C[i] >> V[i] >> D[i] >> L[i];
| ^
a.c... |
s481954269 | p01336 | C++ | #include <bits/stdc++.h>
using namespace std;
#define MAX 350
int N, M;
int cost[MAX];
int rank[MAX][3];
void solve(){
int dp[MAX][MAX][3];
memset(dp, 0, sizeof(dp));
int ans = 0;
for(int k = 0 ; k < 3 ; k++){
for(int i = 0 ; i < N ; i++){
for(int j = 0 ; j <= M ; j++){
if(j-cost[i] < ... | a.cc: In function 'void solve()':
a.cc:22:77: error: reference to 'rank' is ambiguous
22 | dp[i+1][j][k] = max(dp[i][j][k],dp[i+1][j-cost[i]][k] + rank[i][k]);
| ^~~~
In file included from /usr/include/c++/14/bits/s... |
s831899811 | p01336 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#define FOR(i, a, n) for(int i = (int)a; i < (int)n; i++)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
int n, m;
int solve(vector<int>& c, vector<int>& a) {
vector<int> dp(m + 1, 0);
FOR(i, 1, m + 1) REP(j, n)
if(c[j] <= i)
dp[i] = max(dp... | a.cc: In function 'int main()':
a.cc:26:44: error: 'sol0ve' was not declared in this scope; did you mean 'solve'?
26 | cout << max({solve(c, v), solve(c, d), sol0ve(c, l)}) << endl;
| ^~~~~~
| solve
a.cc:26:16: erro... |
s919042152 | p01336 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#define FOR(i, a, n) for(int i = (int)a; i < (int)n; i++)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
int n, m;
int solve(vector<int>& c, vector<int>& a) {
vector<int> dp(m + 1, 0);
FOR(i, 1, m + 1) REP(j, n)
if(c[j] <= i)
dp[i] = max(dp... | a.cc: In function 'int main()':
a.cc:26:44: error: 'sol0ve' was not declared in this scope; did you mean 'solve'?
26 | cout << max({solve(c, v), solve(c, d), sol0ve(c, l)}) << endl;
| ^~~~~~
| solve
a.cc:26:16: erro... |
s877044869 | p01336 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
#define REP... | a.cc: In function 'int main()':
a.cc:32:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
32 | gets(str);
| ^~~~
| getw
|
s464252873 | p01336 | 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:50:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
50 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:54:25: error: 'gets' was not declared in this scope; did you mean 'getw'?
54 | gets(name);
| ^~~~
| ... |
s057663842 | p01336 | C++ | 3 10 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3 10
| ^
|
s597342760 | p01336 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
using namespace std;
type... | a.cc: In function 'int main()':
a.cc:40:25: error: 'gets' was not declared in this scope; did you mean 'getw'?
40 | gets(buf);
| ^~~~
| getw
|
s284710870 | p01336 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int dp[305][305];
char name[50];
int cost[305];
int v[305],b[305],f[305];
int n,m;
int solve(int s[],int i,int c){
int res,sk,nc;
if(i==n) return 0;
if(dp[i][c]>=0) return dp[i][c];
res= solve(s,i+1,c);
for(nc=cost[i],sk=s[i];c>=nc;nc+=cost[i],sk+=s[i... | a.cc: In function 'int main()':
a.cc:31:5: error: 'memset' was not declared in this scope
31 | memset(dp,-1,sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++ |+#include <cstring>
... |
s666156752 | p01336 | C++ | #include <iostream>
#include <string>
#include <cstdio>
#define rep(i,a,b) for(int i=(a);i<(b);i++)
using namespace std;
int n, m;
int c[310], v[310], d[310], l[310];
int dp[310][310];
int main(){
while(scanf("%d %d", &n, &m)!= -1){
//cout <<"AAA" <<n <<" " << m << endl;
rep(i,0,n){
char str[80];
... | a.cc: In function 'int main()':
a.cc:18:7: error: 'gets' was not declared in this scope; did you mean 'getw'?
18 | gets(str);
| ^~~~
| getw
a.cc:45:18: error: expected '}' at end of input
45 | rep(i, 0, n){
| ~^
a.cc:45:18: error: expected '}' at end of inpu... |
s987110260 | p01336 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int dp[1000][100];
string name;
int c[500],v[500],d[500],l[500];
int para[500][3];
int n,m,ans = 0;
int solve(int i, int sum, int j);
int main(){
while(cin >> n >> m){
for(int i = 0; i < n; i++){
getline(cin, name); getline(cin, na... | a.cc: In function 'int main()':
a.cc:21:7: error: 'memset' was not declared in this scope
21 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cstring... |
s412558572 | p01336 | C++ | 3 10
Dobkeradops
7 5 23 10
PataPata
1 1 2 1
dop
5 3 11 14
2 300
Bydo System Alpha
7 11 4 7
Green Inferno
300 300 300 300 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3 10
| ^
|
s517951386 | p01336 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define MP make_pair
using namespace std;
typedef pair<int, int> P;
int dp[500];
int main(){
int n, m;
while(cin >> n >> m){... | a.cc: In function 'int main()':
a.cc:30:25: error: 'memset' was not declared in this scope
30 | 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 | #includ... |
s744475064 | p01336 | C++ | #include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#define INF (2 << 28)
using namespace std;
int main(){
string s;
int n,m,cost[301],d[3][301];
int dp[301];
while(cin >> n >> m){
int maxi = 0;
for(int i=0;i<n;i++){
cin.ignore();
getline(cin,s);
cin ... | a.cc:35:10: error: stray '#' in program
35 | }#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:35:11: error: 'include' was not declared in this scope
35 | }#include <iostream>
| ^~~~~~~
a.cc:35:28: error: expected primary-expression before '>' token
35... |
s044585143 | p01337 | Java | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
//The Number of the Real Roots of a Cubic Equation
public class AOJ2220 {
int a, b, c, d;
double EPS = 1e-8;
List<Double> ans;
double f(double x){
return a*x*x*x + b*x*x + c*x + d;
}
double df(double x){
return 3*a*x*x + 2*b*x + ... | Main.java:6: error: class AOJ2220 is public, should be declared in a file named AOJ2220.java
public class AOJ2220 {
^
1 error
|
s951470018 | p01337 | 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; +... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s090546202 | p01337 | C | #define E 0.00000001
#define zero(n) (fabs(n)<E)
main(n,a,b,c,d,p,q,r,D,f){
for(scanf("%d",&n);n;n--){
scanf("%d%d%d%d",&a,&b,&c,&d); //fx=ax3+bx2+cx+d
if(a<0)a=-a,b=-b,c=-c,d=-d;// won't lose generality
p=3*a,q=2*b,r=c,D=q*q-4*p*r; //f'x=3ax2+2bx+c D: f'x=0?
if(D>0){
double x1=(-q-sqrt(D))/p/2,x2=(-q+sqrt(... | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(n,a,b,c,d,p,q,r,D,f){
| ^~~~
main.c: In function 'main':
main.c:3:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:3:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:3:1: error: type of 'b' defaults to 'in... |
s832963191 | p01337 | C | #define zero(n)(fabs(n)<.01)
main(n,a,b,c,d,p,q,r,D,f){
for(scanf("%d",&n);n;n--){
scanf("%d%d%d%d",&a,&b,&c,&d);//fx=ax3+bx2+cx+d
if(a<0)a=-a,b=-b,c=-c,d=-d; //won't lose generality
p=3*a,q=2*b,r=c,D=q*q-4*p*r; //f'x=3ax2+2bx+c D: f'x=0?
if(D>0){
double x1=(-q-sqrt(D))/p/2,x2=(-q+sqrt(D))/p/2;
double... | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(n,a,b,c,d,p,q,r,D,f){
| ^~~~
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 'a' defaults to 'int' [-Wimplicit-int]
main.c:2:1: error: type of 'b' defaults to 'in... |
s982538489 | p01337 | C++ | #include <iostream>
using namespace std;
const long double eps = 1.0e-5L;
int Q; long double a, b, c, d;
int main() {
cin >> Q;
while (Q--) {
cin >> a >> b >> c >> d;
b *= 1 / a, c *= 1 / a, d *= 1 / a;
long double l = -1.0e+6L, r = 1.0e+6L;
for (int i = 0; i < 70; i++) {
long double m = (l + r) / 2;
if... | a.cc: In function 'int main()':
a.cc:22:52: error: 'sqrt' was not declared in this scope
22 | long double s = (e > eps ? sqrt(e) / 2 : 0);
| ^~~~
|
s237670739 | p01337 | C++ | #error "tsurai"
#include <iostream>
#include <cmath>
#include <utility>
using namespace std;
const double EPS = 1e-7;
double f(double a, double b, double c, double d, double x){
return a*x*x*x + b*x*x + c*x + d;
}
pair<int, int> solve(double a, double b, double c, double d){
double s = (-b - sqrt(b*b - 3*a*c))/3/... | a.cc:1:2: error: #error "tsurai"
1 | #error "tsurai"
| ^~~~~
|
s299643732 | p01337 | C++ | #error "tsurai"
#include <iostream>
#include <cmath>
#include <utility>
using namespace std;
const double EPS = 1e-7;
double f(double a, double b, double c, double d, double x){
return a*x*x*x + b*x*x + c*x + d;
}
pair<int, int> solve(double a, double b, double c, double d){
double s = (-b - sqrt(b*b - 3*a*c))/3/... | a.cc:1:2: error: #error "tsurai"
1 | #error "tsurai"
| ^~~~~
|
s889783856 | p01337 | C++ | #include <cstdio>
#include <vector>
using namespace std;
//ax + b = 0
pair<int,int> solve(int a, int b){
if(b==0) return make_pair(0,0);
if(b>0) return make_pair(0,1);
return make_pair(1,0);
}
//ax^2+bx+c=0
pair<int,int> solve(int a, int b, int c){
if(c==0) return solve(a,b);
int y4a = -b*b + 4*a*c;
if(y4a > 0)... | a.cc: In function 'std::pair<int, int> solve(long long int, long long int, long long int, long long int)':
a.cc:39:44: error: 'sq' was not declared in this scope
39 | bool minimal_x_plus = (b<0 || DD > sq(b)),
| ^~
a.cc:59:29: error: 'maximal_x_minus' was not ... |
s162853117 | p01339 | C++ | k
| a.cc:1:1: error: '\U0000ff4b' does not name a type
1 | k
| ^~
|
s222430021 | p01339 | C++ | #include <iostream>
#include <queue>
#include <cstdio>
#include <cstring>
#define INF 100005
using namesapce std;
char str[INF];
struct acnode{
int sum;
ancode *next[26];
ancode *fail;
ancode():sum(0),fail(NULL){
for(int i=0;i<26;i++){
next[i]=NULL;
}
}
}root;
void insrt(char *s){
int len=strlen(s);
ancod... | a.cc:6:7: error: expected nested-name-specifier before 'namesapce'
6 | using namesapce std;
| ^~~~~~~~~
a.cc:10:9: error: 'ancode' does not name a type; did you mean 'acnode'?
10 | ancode *next[26];
| ^~~~~~
| acnode
a.cc:11:9: error: 'ancode' does not name a type;... |
s574360180 | p01339 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MAX 1005
ll mod=1e9+7;
int n,m,a,b;
vector<int> G[MAX],g[MAX];
int p[MAX];
bool flg[MAX];
int update(int x){
flg[x]=true;
if(p[x]==x)return x;
return p[x]=update(p[x]);
}
int find(int x){
if(p[x]==x)return x;
return find(p[x]);
}
... | a.cc: In function 'll dfs(int)':
a.cc:25:9: error: 'mul' was not declared in this scope; did you mean 'fmul'?
25 | res=mul(res,dfs(g[pos][i]));
| ^~~
| fmul
|
s160351486 | p01339 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
#include <random>
... | a.cc: In function 'll solve(int, int)':
a.cc:98:3: error: 'ret' was not declared in this scope; did you mean 'rep'?
98 | ret = 1;
| ^~~
| rep
a.cc: In function 'int main()':
a.cc:140:31: error: 'dp' was not declared in this scope
140 | rep(i, K) if(deg[i] == 0 && dp[i] < 0) {
| ... |
s122921411 | p01339 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
#include <random>
... | a.cc: In function 'int main()':
a.cc:140:31: error: 'dp' was not declared in this scope
140 | rep(i, K) if(deg[i] == 0 && dp[i] < 0) {
| ^~
|
s781179403 | p01339 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
#include <random>
... | a.cc: In function 'll solve(int, int, std::vector<int>&)':
a.cc:99:16: error: expected ';' before 'for'
99 | vis[curr] = 1
| ^
| ;
100 | for(auto e: tree[curr]) {
| ~~~
a.cc: In function 'int main()':
a.cc:143:25: error: invalid initialization of ref... |
s205456100 | p01339 | C++ | #include<iostream>
#include<vector>
#define REP(i, b, n) for(int i = b; i < (int)n; i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
typedef unsigned long long ll;
const int N = 1000;
const ll MOD = 1000000007;
int V, cmp[N];
vector<int> G[N], rG[N], vs;
bool used[N];
void init(){
rep(i, N){
G[i].cl... | a.cc: In function 'int main()':
a.cc:84:5: error: 'assert' was not declared in this scope
84 | assert(first);
| ^~~~~~
a.cc:3:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
2 | #include<vector>
+++ |+#include <cassert>
3 |
|
s342644703 | p01339 | C++ | /*
* Package: StandardCodeLibrary.Core
* */
//蠑戊ソ帛クク逕ィ逧?、エ譁?サカ蟷カ菴ソ逕ィstd蜷榊ュ礼ゥコ髣エ
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <vector>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include ... | a.cc:80:2: error: #else without #if
80 | #else
| ^~~~
a.cc:81:9: warning: "prt" redefined
81 | #define prt(x) cerr<<"隨ャ"<<__LINE__<<"陦圭t: "<<#x"\t="<<(x)<<endl
| ^~~
a.cc:71:9: note: this is the location of the previous definition
71 | #define prt(x) (cerr)
| ^~~
a.cc:82:9: w... |
s436907405 | p01339 | C++ | /*
* Package: StandardCodeLibrary.Core
* */
//蠑戊ソ帛クク逕ィ逧?、エ譁?サカ蟷カ菴ソ逕ィstd蜷榊ュ礼ゥコ髣エ
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <vector>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include ... | a.cc:102:12: error: 'lli' was not declared in this scope
102 | typedef pr<lli,lli> pll;
| ^~~
a.cc:102:16: error: 'lli' was not declared in this scope
102 | typedef pr<lli,lli> pll;
| ^~~
a.cc:102:19: error: template argument 1 is invalid
102 | typedef pr<lli,lli> pll;
... |
s123541673 | p01339 | C++ | /*
* Package: StandardCodeLibrary.Core
* */
//蠑戊ソ帛クク逕ィ逧?、エ譁?サカ蟷カ菴ソ逕ィstd蜷榊ュ礼ゥコ髣エ
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <vector>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include ... | a.cc:102:14: error: 'lli' was not declared in this scope
102 | typedef pair<lli,lli> pll;
| ^~~
a.cc:102:18: error: 'lli' was not declared in this scope
102 | typedef pair<lli,lli> pll;
| ^~~
a.cc:102:21: error: template argument 1 is invalid
102 | typedef pair<lli,lli> p... |
s060545386 | p01339 | C++ | /*
* Package: StandardCodeLibrary.Core
* */
//蠑戊ソ帛クク逕ィ逧?、エ譁?サカ蟷カ菴ソ逕ィstd蜷榊ュ礼ゥコ髣エ
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <vector>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include ... | a.cc:80:2: error: #else without #if
80 | #else
| ^~~~
a.cc:81:9: warning: "prt" redefined
81 | #define prt(x) cerr<<"隨ャ"<<__LINE__<<"陦圭t: "<<#x"\t="<<(x)<<endl
| ^~~
a.cc:71:9: note: this is the location of the previous definition
71 | #define prt(x) (cerr)
| ^~~
a.cc:82:9: w... |
s564422221 | p01339 | C++ | struct EDGE
{
int v,cap,next;
}e[EM];
int head[VM],cnt=0;
int dis[VM],vn[VM];
int source,sink,NV;
void add(int u,int v,int c)
{
e[cnt].v=v;e[cnt].cap=c;e[cnt].next=head[u];head[u]=cnt++;
e[cnt].v=u;e[cnt].cap=c;e[cnt].next=head[v];head[v]=cnt++;
}
void init()
{
memset(head,-1,sizeof(head));
cnt=0... | a.cc:4:4: error: 'EM' was not declared in this scope
4 | }e[EM];
| ^~
a.cc:6:10: error: 'VM' was not declared in this scope
6 | int head[VM],cnt=0;
| ^~
a.cc:7:9: error: 'VM' was not declared in this scope
7 | int dis[VM],vn[VM];
| ^~
a.cc:7:16: error: 'VM' was not decl... |
s414268494 | p01339 | C++ | #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <stack>;
#define mod 1000000007
#define INF 10000
using namespace std;
vestor <int>point[100000];
struct brige
{
int str,end;
};
ve... | a.cc:11:17: warning: extra tokens at end of #include directive
11 | #include <stack>;
| ^
a.cc:15:1: error: 'vestor' does not name a type
15 | vestor <int>point[100000];
| ^~~~~~
a.cc: In function 'int dfs(int, int)':
a.cc:33:8: error: reference to 'end' is ambiguous
33 | end... |
s260016528 | p01340 | Java | import java.util.*;
public class FrogPond {
int h, w;
char[][] board;
char[] directions = { 'U', 'L', 'D', 'R' };
int[] directionX = { -1, 0, 1, 0 };
int[] directionY = { 0, -1, 0, 1 };
Stack<Character> solution = new Stack<Character>();
int countLeaves() {
int sum = 0;
for (int i=0; i<board.length; i++)... | Main.java:3: error: class FrogPond is public, should be declared in a file named FrogPond.java
public class FrogPond {
^
1 error
|
s339579102 | p01340 | C | #include <iostream>
#include <string>
#include <string.h>
#include <fstream>
using namespace std;
#define MAXN 11
int n, m, s, e, d, total;
int c[MAXN][MAXN];
int dir[4][2] = {0, -1, -1, 0, 0, 1, 1, 0};
int ans[MAXN * MAXN];
bool ok;
int change(char ch)
{
switch(ch)
{
case 'L': return 0;
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s062661831 | p01341 | Java |
import java.io.*;
import java.util.*;
public class SaveYourCat {
FastScanner in = new FastScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
class Edge {
int to;
double cost;
Edge(int to, double cost) {
this.to = to;
this.cost = cost;
}
}
final int CONV_CONST = 10010;
boolean... | Main.java:5: error: class SaveYourCat is public, should be declared in a file named SaveYourCat.java
public class SaveYourCat {
^
1 error
|
s801914120 | p01341 | C | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
using namespace std;
int par[10050];
int N,M;
struct edge
{
int u,v;
double dis;
}es[10050];
struct zb
{
int x1,y1;
}z[10050];
void init()
{
for(int i=0;i<10050;i++)
{
par[i]=i;
}
}
int findroot(int x)
{
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s599824241 | p01341 | C | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<cmath>
using namespace std;
const int maxn=1e4+7;
int N, M;
int x[maxn], y[maxn];
int p[maxn];
int cnt;
struct edge
{
int u, v, cost;
};
vector<edge> es;
int p[maxn];
void init()
{
for(int i=0;i<=N;i++) p[i]=i;
... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s678750254 | p01341 | C | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<cmath>
using namespace std;
const int maxn=1e4+7;
int N, M;
int x[maxn], y[maxn];
int p[maxn];
int cnt;
struct edge
{
int u, v, cost;
bool operator < (const edge & x) const
{
return cost<x.cost;
... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s166567554 | p01341 | C | #include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int per[20000+10];
struct node
{
int a;
int b;
double edge;
};
node es[10000+10];
bool cmp(node x,node y)
{
return x.edge>y.edge;
}
int find(int x)
{
if(per[x]==x)
return x;
return per[x]=find(per[x]);
}
in... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s674988352 | p01341 | C | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
#include <cmath>
#include <stack>
#include <map>
#include <set>
#define pi acos(-1)
#define LL long long
#define INF 0x3f3f3f3f
using namespace std;
typedef pair<int, int> P;
const int maxn = 1e5 + 5;
struc... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s169852389 | p01341 | C | #include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<queue>
#include<cstdio>
using namespace std;
#define inf 0x3f3f3f3f
#define pr(x) cout<<"x="<<x<<endl;
#define maxn 1000100
int N, M;
int par[maxn];
int x[maxn], y[maxn];
struct point{
int ls, rs;
double cost;
}p[maxn];
bool comp(po... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s104462275 | p01341 | C | #include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
const int maxn=10005;
int pre[maxn];
struct node
{
int a,b;
double len;
}point[maxn],edge[maxn*100];
double dist(node x,node y)
{
return sqrt((x.a*1.0-y.a)*(x.a-y.a)+(x.b*1.0-y.b)*(x.b-y.b));
}
void init(... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s263051849 | p01341 | C | #include<stdio.h>
#include<algorithm>
#include<math.h>
#include<iostream>
using namespace std;
#define N 11000
int f[N];
int father(int x)
{
while(x!=f[x])
{
x=f[x];
}
return x;
}
struct node
{
double x,y;
}p[N];
struct node1
{
int b,a;
double d;
}bian[N*N/2+10];
double dis(node A,no... | main.c:2:9: fatal error: algorithm: No such file or directory
2 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s721615900 | p01341 | C++ | #include <iostream>
#include <cstudio>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
typedef pair<int, int> P;
int const MAX_N = 10000;
int N, M;
P piles[MAX_N];
double distance(int x0, int y0, int x1, int y1) {
return hypot(x1-x0, y1-y0);
}
// O(E*log(V))
struct Edge {
Edge(i... | a.cc:2:10: fatal error: cstudio: No such file or directory
2 | #include <cstudio>
| ^~~~~~~~~
compilation terminated.
|
s771345157 | p01341 | C++ | #pragma warning (disable:4996)
#include<iostream>
#include<cstdio>
#include<queue>
#include<cstring>
#include<string>
#include<cmath>
using namespace std;
int x[10002];
int y[10002];
int fa[10002];
int n, m;
int num;
struct edge{
int u;
int v;
double cost;
};
bool cmp(edge a, edge b){
return a.cost < b.cost;
}
edg... | a.cc: In function 'double krusal()':
a.cc:42:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
42 | sort(es, es + num, cmp);
| ^~~~
| sqrt
|
s528432355 | p01341 | C++ | #include <cmath>
#include <queue>
#include <vector>
#pragma warning(disable : 4996)
using namespace std;
class UnionFind {
private:
int size_; vector<int> g; vector<vector<int> > v;
public:
UnionFind() : size_(0), g(vector<int>()), v(vector<vector<int> >()) {};
UnionFind(int size__) : size_(size__) { g.resize(size_)... | a.cc: In function 'int main()':
a.cc:32:9: error: 'scanf' was not declared in this scope
32 | scanf("%d%d", &V, &E);
| ^~~~~
a.cc:39:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
39 | sort(e, e + E);
| ^~~~
| sqrt
a.cc:40:9: error: ... |
s740544464 | p01341 | C++ | #include <cmath>
#include <queue>
#include <cstdio>
#include <vector>
using namespace std;
class UnionFind {
private:
int size_; vector<int> g; vector<vector<int> > v;
public:
UnionFind() : size_(0), g(vector<int>()), v(vector<vector<int> >()) {};
UnionFind(int size__) : size_(size__) { g.resize(size_), v.resize(siz... | a.cc: In function 'int main()':
a.cc:39:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
39 | sort(e, e + E);
| ^~~~
| sqrt
a.cc:40:9: error: 'reverse' was not declared in this scope
40 | reverse(e, e + E);
| ^~~~~~~
|
s837557064 | p01341 | C++ | #include <bits/stdc++.h>
using namespace std;
#define MAX 100000
int N, M;
int par[MAX], rank[MAX];
typedef pair<double,double> P;
void init(){
for(int i = 0 ; i < N ; i++){
par[i] = i;
rank[i] = 0;
}
}
int find(int x){
if(par[x] == x){
return x;
}else{
return par[x] = find(par[x]);
}
}
... | a.cc: In function 'void init()':
a.cc:13:9: error: reference to 'rank' is ambiguous
13 | rank[i] = 0;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
... |
s468640534 | p01341 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
#include <cmath>
using namespace std;
const int maxn = 1e4+10;
const int maxe = 1e8;
int pa[maxn],rank[maxn];
void init(int n){
for(int i=0; i<n; i++){
pa[i] = i;
rank[i] = 0;
}
}
int find(int x){
... | a.cc: In function 'void init(int)':
a.cc:17:17: error: reference to 'rank' is ambiguous
17 | rank[i] = 0;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++... |
s329396783 | p01341 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
#include <cmath>
using namespace std;
#define maxn 10000+10;
#define maxe maxn*maxn/2+1;
int pa[maxn],ran[maxn];
void init(int n){
for(int i=0; i<n; i++){
pa[i] = i;
ran[i] = 0;
}
}
int find(int x){... | a.cc:10:22: error: expected ']' before ';' token
10 | #define maxn 10000+10;
| ^
a.cc:12:8: note: in expansion of macro 'maxn'
12 | int pa[maxn],ran[maxn];
| ^~~~
a.cc:12:12: error: expected unqualified-id before ']' token
12 | int pa[maxn],ran[maxn];
| ... |
s029139185 | p01341 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
#include <cmath>
using namespace std;
#define maxn 10000+10
#define maxe maxn*maxn/2+1
int pa[maxn],ran[maxn];
void init(const int& n){
for(int i=0; i<n; i++){
pa[i] = i;
ran[i] = 0;
}
}
// int find... | a.cc: In function 'int find(const int&)':
a.cc:27:13: error: 'parent' was not declared in this scope
27 | if (parent[x] == x)
| ^~~~~~
|
s718269144 | p01341 | C++ | #include <iostream>
2.#include <algorithm>
3.#include <vector>
4.#include <utility>
5.#include <cmath>
6.#include <iomanip>
7.using namespace std;
8.
9.// ?舵?????虫?鎹?????
10.#define MAX_N 10000 + 16
11.int parent[MAX_N];
12.int height[MAX_N];
13.
14.void init(const int& n)
15.{
16. for (int i = 0; i < n; ++i)
17. {
1... | a.cc:2:3: error: stray '#' in program
2 | 2.#include <algorithm>
| ^
a.cc:3:3: error: stray '#' in program
3 | 3.#include <vector>
| ^
a.cc:4:3: error: stray '#' in program
4 | 4.#include <utility>
| ^
a.cc:5:3: error: stray '#' in program
5 | 5.#include <cmath>
| ^
a.cc:... |
s311255350 | p01341 | C++ | /*
能把所有的猫放出来,即不存在?
那?我?就要破?
?个?留切最小?,?剩大?
即求最大生成?,ans=sum-MST;
*/
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define RG register int
#define maxn 10005
#define rep(i,a,b) for(RG i=a;i<=b;i++)
#define per(i,a,b) for(RG i=a;i>=b;i--)
#define inf (1<<30)
using namespace std;
int n,m,fa[maxn]... | a.cc: In function 'double cal(const int&, const int&)':
a.cc:39:16: error: 'sqrt' was not declared in this scope
39 | return sqrt((point[a].x-point[b].x)*(point[a].x-point[b].x)+(point[a].y-point[b].y)*(point[a].y-point[b].y));
| ^~~~
a.cc: In function 'void MST()':
a.cc:51:13: warning: ... |
s957980177 | p01341 | C++ | #include<iostream>
#include<map>
#include<vector>
#include<functional>
#include<iomanip>
#include<iterator>
#include<numeric>
using namespace std;
typedef pair<int, int> Pair;
multimap<double, Pair,greater<double>> m;
vector<Pair> v2;
bool b[10002] = {};
int main()
{
int N, M;
double sum = 0.0;
cin >> N >> M;
... | a.cc: In function 'int main()':
a.cc:29:29: error: 'sqrt' was not declared in this scope
29 | double temp=sqrt((v2[p - 1].first - v2[q - 1].first)*(v2[p - 1].first - v2[q - 1].first) + (v2[p - 1].second - v2[q - 1].second)*(v2[p - 1].second - v2[q - 1].second));
| ^~... |
s022850260 | p01341 | C++ | #include<iostream>
#include<queue>
#include<functional>
#include<iomanip>
#define MP(a,b) make_pair((a),(b))
using namespace std;
typedef pair<int, int> XY;
typedef pair<int, int> Piles;
class Node
{
public:
Node* getRoot()
{
if (parent != this)
{
return parent->getRoot();
}
else
{
return this;
}
... | a.cc: In function 'int main()':
a.cc:52:28: error: 'sqrt' was not declared in this scope
52 | q1.push(MP(sqrt(a*a+ b*b), MP(t1, t2)));
| ^~~~
a.cc:5:28: note: in definition of macro 'MP'
5 | #define MP(a,b) make_pair((a),(b))
| ^
|
s571214773 | p01341 | C++ | /*
Á·Ï°Ì⣺Save your cats_AOJ 2224
¼õÈ¥×îÉÙ¡¢Ð¡µÄ±ß£¬Ê¹µÃÕû¸öÆ½ÃæÁ¬Í¨£»
¼´ÎªÇó×î´óÉú³ÉÊ÷ÎÊÌ⣬µ«×¢ÒâÇóµÄÊDzÃÈ¥µÄ·¾¶¡£
*/
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
const int MAX_E=10007, MAX_V=10007;
int mark[MAX_E];
pair<int, int> ver[MAX_V];
struct edge{
int u, v, cost;
}... | a.cc: In function 'double kruskal()':
a.cc:99:30: error: 'sqrt' was not declared in this scope
99 | res+=sqrt(-es[i].cost);
| ^~~~
|
s558857301 | p01341 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <functional>
#include <algorithm>
using namespace std;
const int MAXV = 10001;
const int MAXE = MAXV * (MAXV);
const int INF = 0x3f3f3f3f;
typedef long long LL;
typedef pair<int, int> P; // 坐标点
P p[MAXV];
//int cost[MAXV][MAXV];
//int m... | a.cc: In function 'int main(int, const char**)':
a.cc:121:17: error: 'memset' was not declared in this scope
121 | memset(edge, 0, sizeof(edge));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #i... |
s238755549 | p01341 | C++ | #include <iostream>
#include <string>
#include <stack>
#include <utility>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>
#include <iomanip>
using namespace std;
const long long int MOD = 1000000007;
vector<int> g[10010];
int main() {
int N, M;
cin >> N >> M;
vector<int> x(N), y(N);
for (i... | a.cc: In function 'int main()':
a.cc:27:31: error: 'sqrt' was not declared in this scope
27 | double dist = sqrt((x[a] - x[b])*(x[a] - x[b]) + (y[a] - y[b])*(y[a] - y[b]));
| ^~~~
a.cc:39:28: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_t... |
s015958920 | p01341 | C++ | #include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
using namespace std;
int N, M;
struct Node {
int x;
int y;
};
struct Link {
int node1;
int node2;
double len;
};
bool compare(const Link& left, const Link& right);
int main(void) {
cin >> N >> M;
vector<int> array[N];
int f... | a.cc: In function 'int main()':
a.cc:23:3: error: 'cin' was not declared in this scope
23 | cin >> N >> M;
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include <math.h>
+++ |+#include <iostream>
5 | using namespa... |
s442939784 | p01346 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <c... | a.cc: In function 'int main()':
a.cc:94:18: error: expected '}' at end of input
94 | return 0;
| ^
a.cc:78:11: note: to match this '{'
78 | int main(){
| ^
|
s168904695 | p01346 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
using namespace std;
typedef __int64 LL;
LL A[1000100];
int main()
{
LL n,m,l,r;
while(cin>>n>>l>>m>>r)
{
LL sum=0,k=0;
for(int i=0;i<n;i++)
{
cin>>A[i];
... | a.cc:8:9: error: '__int64' does not name a type; did you mean '__int64_t'?
8 | typedef __int64 LL;
| ^~~~~~~
| __int64_t
a.cc:9:1: error: 'LL' does not name a type
9 | LL A[1000100];
| ^~
a.cc: In function 'int main()':
a.cc:12:5: error: 'LL' was not declared in this scope
1... |
s623450621 | p01346 | C++ | a#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
using namespace std;
#define inf 2147480000
int n;
double m,l,r;
long long int sum[1000001];
int m... | a.cc:1:2: error: stray '#' in program
1 | a#include <vector>
| ^
a.cc:1:1: error: 'a' does not name a type
1 | a#include <vector>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/deque:62,
from a.cc:2:
/usr/include/c++/... |
s489470697 | p01347 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <queue>
#include <cmath>
#include <algorithm>
#include <functional>
#include <utility>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define rep1(i,n) for(int i=1;i<=(n);++i)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define... | a.cc: In function 'void add_edge(int, int, int, int)':
a.cc:29:46: error: no matching function for call to 'edge::edge(int&, int&, int&, std::vector<edge>::size_type)'
29 | edge e1=edge(to,cap,cost,G[to].size()),e2=edge(from,0,-cost,G[from].size());
| ^
a.cc... |
s217404876 | p01349 | C++ | import java.io.IOException;
import java.util.InputMismatchException;
public class Main {
int h, w, n;
char[][] f;
char[][] swap(int x1, int y1, int x2, int y2) {
char[][] res = new char[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
res[i][j] = f[i][j];
}
}
char tmp = res[y1][... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.InputMismatchException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available... |
s949950991 | p01349 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
char ta[50][50],tb[50][50];
int n,h,w;
bool used[50][50],can[50][50];
bool ok(){
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
tb[i][j]=ta[i][j];
}
}
int cnt=0;
char tmp;
for(int cc=0;cc<300;cc++){
for(int i=0;i<50;i++)for(int j... | a.cc: In function 'bool ok()':
a.cc:24:48: error: 'i' was not declared in this scope; did you mean 'ni'?
24 | int ni=i;
| ^
| ni
a.cc:67:17: warning: no return statement i... |
s181069072 | p01349 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
char ta[50][50],tb[50][50];
int n,h,w;
bool used[50][50],can[50][50];
bool ok(){
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
tb[i][j]=ta[i][j];
}
}
int cnt=0;
char tmp;
for(int cc=0;cc<300;cc++){
for(int i=0;i<50;i++)for(int j... | a.cc: In function 'bool ok()':
a.cc:24:48: error: 'i' was not declared in this scope; did you mean 'ni'?
24 | int ni=i;
| ^
| ni
a.cc:67:17: warning: no return statement i... |
s215086685 | p01349 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
char ta[50][50],tb[50][50];
int n,h,w;
bool used[50][50],can[50][50];
bool ok(){
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
tb[i][j]=ta[i][j];
}
}
int cnt=0;
char tmp;
for(int cc=0;cc<300;cc++){
for(int i=0;i<50;i++)for(int j... | a.cc: In function 'bool ok()':
a.cc:24:48: error: 'i' was not declared in this scope; did you mean 'ni'?
24 | int ni=i;
| ^
| ni
a.cc:67:17: warning: no return statement i... |
s746402941 | p01349 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
char ta[50][50],tb[50][50];
int n,h,w;
bool used[50][50],can[50][50];
bool ok(){
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
tb[i][j]=ta[i][j];
}
}
int cnt=0;
char tmp;
bool endf=0;
for(int cc=0;cc<300;cc++){
endf=0;
for(int ... | a.cc: In function 'bool ok()':
a.cc:24:48: error: 'i' was not declared in this scope; did you mean 'ni'?
24 | int ni=i;
| ^
| ni
a.cc:66:36: error: break statement not wit... |
s447383233 | p01349 | C++ | #include <iostream>
#include <string>
#include <stdio.h>
#include <vector>
#include <bitset>
using namespace std;
int h, w, n;
char map[30][30];
string ans[] = { "NO", "YES" };
int getlen( char tmap[30][30], char ttmap[30][30], char target, int x, int y, int dx, int dy, int depth, bool mode) {
if( x < 0 || y >= w |... | a.cc: In function 'bool search(int*)':
a.cc:25:9: error: 'memcpy' was not declared in this scope
25 | memcpy( tmap, map, sizeof(map) );
| ^~~~~~
a.cc:6:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <bitset>
+++ |+#... |
s675040801 | p01349 | C++ | #include<string>
#include<vector>
using namespace std;
struct xy{int x,y;};
int main(){
int h,w,n;
cin >> h >> w >> n;
int bl[30][30]={{}};
int bbl[30][30]={{}};
int abl[30][30]={{}};
int i,j,k;
string str;
for(i=0;i<h;i++){
cin >> str;
for(j=0;j<w;j++){
if(str[j]=='.') bl[j][i]=0;
e... | a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin >> h >> w >> n;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<vector>
+++ |+#include <iostream>
3 | using name... |
s875935442 | p01349 | C++ | #include<bits/stdc++.h>
using namespace std;
int h,w,n;
void drop(vector<string> &cp){
for(int j=0;j<w;j++){
int empcnt=0;
for(int i=h-1;i>=0;i--){
if(cp[i][j]=='.') empcnt++;
else if(empcnt>0){
cp[i+empcnt][j]=cp[i][j];
cp[i][j]='.';
}
}
}
return;
}
bool clear(vector<string> &cp... | a.cc:137:2: error: unterminated argument list invoking macro "assert"
137 | }
| ^
a.cc: In function 'bool check(std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:102:3: error: 'assert' was not declared in this scope
102 | assert(times<500;
| ^~~~~~
a.cc:2:1: note: 'assert' is defined in heade... |
s284465921 | p01349 | C++ | #include<bits/stdc++.h>
using namespace std;
int h,w,n;
void drop(vector<string> &cp){
for(int j=0;j<w;j++){
int empcnt=0;
for(int i=h-1;i>=0;i--){
if(cp[i][j]=='.') empcnt++;
else if(empcnt>0){
cp[i+empcnt][j]=cp[i][j];
cp[i][j]='.';
}
}
}
return;
}
bool clear(vector<string> &cp... | a.cc:137:2: error: unterminated argument list invoking macro "assert"
137 | }
| ^
a.cc: In function 'bool check(std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:102:3: error: 'assert' was not declared in this scope
102 | assert(times<500;
| ^~~~~~
a.cc:2:1: note: 'assert' is defined in heade... |
s100611468 | p01349 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loo... | a.cc: In function 'int main()':
a.cc:54:30: error: 'in' was not declared in this scope; did you mean 'n'?
54 | rep(x,m-1)rep(y,n)if(in[x][y]!='.'&&in[x+1][y]!='.'){
| ^~
| n
a.cc:55:20: error: redeclaration of 'vs in'
55 | ... |
s234976898 | p01349 | C++ | #include<bits/stdc++.h>
using namespace std;
bool game(int n, int i, int j, vector<vector<int> > ennichi){
int h = ennichi.size();
int w = ennichi[0].size();
int temp = ennichi[i][j];
ennichi[i][j] = ennichi[i][j + 1];
ennichi[i][j + 1] = temp;
while(1){
bool end = true;
for(... | a.cc: In function 'bool game(int, int, int, std::vector<std::vector<int> >)':
a.cc:19:17: error: expected ',' or ';' before 'for'
19 | for(int k = j + 1; k <= j + n; k++){
| ^~~
a.cc:19:36: error: 'k' was not declared in this scope
19 | for(int k = j + 1; k <=... |
s837447787 | p01349 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define loop(x, n) for(int x = 0; x < n; ++ x)
int h, w, n;
void fall(int xs, int ys, vector<vector<char> > & field) {
if (ys + 1 < h && field[ys][xs] != '.' && field[ys + 1][xs] == '.') {
//cout<<" !!!"<<endl;
field[ys + 1][xs] = field[ys][xs];
field[... | a.cc:27:73: error: size of array 'result' is not an integral constant-expression
27 | vector<vector<char> > & field, char begin, int result[w * h][4]) {
| ~~^~~
a.cc:64:27: error: size of array 'result' is not an integral con... |
s117606623 | p01349 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define loop(x, n) for(int x = 0; x < n; ++ x)
int h, w, n;
void fall(int xs, int ys, vector<vector<char> > & field) {
if (ys + 1 < h && field[ys][xs] != '.' && field[ys + 1][xs] == '.') {
field[ys + 1][xs] = field[ys][xs];
field[ys][xs] = '.';
fall(xs... | a.cc:25:73: error: size of array 'result' is not an integral constant-expression
25 | vector<vector<char> > & field, char begin, int result[w * h][4]) {
| ~~^~~
a.cc:62:27: error: size of array 'result' is not an integral con... |
s042583672 | p01349 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define loop(x, n) for(int x = 0; x < n; ++ x)
int h, w, n;
void fall(int xs, int ys, vector<vector<char> > & field) {
if (ys + 1 < h && field[ys][xs] != '.' && field[ys + 1][xs] == '.') {
field[ys + 1][xs] = field[ys][xs];
field[ys][xs] = '.';
fall(xs... | a.cc:62:27: error: size of array 'result' is not an integral constant-expression
62 | int newCheck(int result[w * h][4], vector<vector<char> > & field) {
| ~~^~~
|
s086199890 | p01349 | C++ | #include<iostream>
#include<Windows.h>
using namespace std;
int h,w,n;
void copy(int map[31][31],int copymap[31][31]){
for(int i=0;i<31;i++){
for(int j=0;j<31;j++){
copymap[i][j] = map[i][j];
}
}
}
bool solve(int map[31][31]){
POINT deletemap[10000];
int count=0;
int code;
for(int i=0;i<h;i++){
for(in... | a.cc:2:9: fatal error: Windows.h: No such file or directory
2 | #include<Windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s124568822 | p01349 | C++ | #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <c... | a.cc: In function 'std::vector<_Tp> setToVector(std::set<T>)':
a.cc:40:9: error: need 'typename' before 'std::set<T>::iterator' because 'std::set<T>' is a dependent scope
40 | set<T>::iterator it = x.begin();
| ^~~~~~
a.cc:40:25: error: expected ';' before 'it'
40 | set<T>::iterator ... |
s230006249 | p01349 | C++ | 2#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <functional>
#include <iostream>
#include <iomanip>
#include <iterator>
#include <map>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
typedef long long Long;
#define whole(xs) xs.begin... | a.cc:1:2: error: stray '#' in program
1 | 2#include <algorithm>
| ^
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 2#include <algorithm>
| ^
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/stl_function.h:60,
... |
s570798373 | p01350 | C++ | #include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
// distance between (x1,y1) and (x2,y2)
double cdis(double x1, double y1, double x2, double y2) {
return sqrtl((x1 - x2) * (x1 - x2) +
(y1 - y2) * (y1 - y2));
}
// cos a
double costh(double a, double b, double c) {
retu... | a.cc: In function 'int solve()':
a.cc:64:21: error: 'k' was not declared in this scope
64 | dp[i][j][k - 1] == 0 ||
| ^
a.cc:67:21: error: 'k' was not declared in this scope
67 | if(dp[j][l][k] == 0) {
| ^
a.cc:75:13: error: 'k' was not declar... |
s035789695 | p01350 | C++ | #include<iostream>
#include<complex>
#include<queue>
#include<cmath>
#include<algorithm>
using namespace std;
typedef complex<double> P;
struct S{
int w,p,n;
double d;
bool operator<(S s)const{
return d>s.d;
}
};
double dot(P a,P b){
return (conj(a)*b).real();
}
int main(){
int n;
double r,t... | a.cc: In function 'int main()':
a.cc:37:14: error: 'class std::priority_queue<S>' has no member named 'mepty'; did you mean 'empty'?
37 | while(!que.mepty()){
| ^~~~~
| empty
a.cc:41:28: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
41 | ... |
s001126334 | p01350 | C++ | #include<iostream>
#include<complex>
#include<queue>
#include<cmath>
#include<algorithm>
using namespace std;
typedef complex<double> P;
struct S{
int w,p,n;
double d;
bool operator<(S s)const{
return d>s.d;
}
}; | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s151577040 | p01350 | C++ | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> vi;
typedef vector<vi> vvi;
typed... | a.cc: In function 'int main()':
a.cc:71:44: error: no matching function for call to 'min(double&, D)'
71 | dp[i+1][np][cp]=min(dp[i+1][np][cp],dp[i][cp][pp]+add);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/a... |
s734082085 | p01350 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
const long double PI = 3.14159255358979323846264338327950288l;
int n; long long r, s;
struct Point { long double px, py; };
long double theta(long double a, long double b, long double c) {
long double s = (a + b + c) / 2.0l;
long double S = s... | a.cc:26:32: error: conflicting declaration 'long double r'
26 | long double dp[20000][30][30], r, t; Point x[30]; int n;
| ^
a.cc:6:18: note: previous declaration as 'long long int r'
6 | int n; long long r, s;
| ^
a.cc:26:55: error: redefinition of 'in... |
s586871540 | p01350 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
const long double PI = 3.14159255358979323846264338327950288l;
int n; long long r, s;
struct Point { long double px, py; };
long double theta(long double a, long double b, long double c) {
long double s = (a + b + c) / 2.0l;
long double S = s... | a.cc:26:32: error: conflicting declaration 'long double r'
26 | long double dp[20000][30][30], r, t; Point x[30]; int n;
| ^
a.cc:6:18: note: previous declaration as 'long long int r'
6 | int n; long long r, s;
| ^
a.cc:26:55: error: redefinition of 'in... |
s156211523 | p01350 | C++ | #define EPS (1e-10)
#define equals(a, b) (fabs((a)-(b)) < EPS)
#define lt(a, b) ((a) - (b) < -EPS)
// ???/????????????
struct Point {
double x, y;
Point(double x = 0.0, double y = 0.0):x(x), y(y){}
Point operator + (Point p) { return Point(x + p.x, y + p.y); }
Point operator - (Point p) { return Point(x - p... | a.cc: In member function 'double Point::abs()':
a.cc:15:25: error: 'sqrt' was not declared in this scope
15 | double abs() { return sqrt(norm()); }
| ^~~~
a.cc: In member function 'bool Point::operator==(const Point&) const':
a.cc:22:12: error: 'fabs' was not declared in this scope; d... |
s010153733 | p01350 | C++ | #include<cmath>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<functional>
#define scanf scanf_s
#define fir first
#define sec second
#define mp make_pair
#define mt make_tuple
#define pub push_back
using namespace std;
typedef long long int llint;
const llint one = 1;
const llint big = (one<<30);
int ... | a.cc: In function 'int main()':
a.cc:6:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
6 | #define scanf scanf_s
| ^~~~~~~
a.cc:26:9: note: in expansion of macro 'scanf'
26 | scanf("%d",&n);
| ^~~~~
|
s179029161 | p01350 | C++ | #include <iostream>
#include <cstdlib>
int main() {
cout << rand() % (1e9 + 7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cout << rand() % (1e9 + 7) << endl;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream co... |
s916462358 | p01350 | C++ | #include<bits/stdc++.h>
#define x real()
#define y imag()
using namespace std;
typedef complex<double> P;
int n;
double r,d;
P p[20];
double dp[10001][20][20];
bool check(int a,int b,int c){
if(b==c)return 0;
if(a==b)return 1;
P o=p[b]-p[a],s=p[c]-p[b];
s*=conj(o);
return real(s/abs(s))>=cos(M_PI*d/180);
}
... | a.cc: In function 'int main()':
a.cc:22:26: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
22 | for(int i=0;i<n;i++)cin>>p[i].x>>p[i].y;
| ~~~^~
| |
| std::istream ... |
s509001044 | p01350 | C++ | #include<bits/stdc++.h>
#define x real()
#define y imag()
using namespace std;
typedef complex<double> P;
int n;
double r,d;
P p[20];
double dp[10001][20][20];
bool check(int a,int b,int c){
if(b==c)return 0;
if(a==b)return 1;
P o=p[b]-p[a],s=p[c]-p[b];
s*=conj(o);
return real(s/abs(s))>=cos(M_PI*d/180);
}
... | a.cc: In function 'int main()':
a.cc:22:26: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
22 | for(int i=0;i<n;i++)cin>>p[i].x>>p[i].y;
| ~~~^~
| |
| std::istream ... |
s955891001 | p01350 | C++ | #include<bits/stdc++.h>
#define x real()
#define y imag()
using namespace std;
typedef complex<double> P;
typedef pair<int,int> Pi;
typedef pair<double,int> Pd;
typedef pair<Pd,Pi> S;
int n;
double r,d;
P p[20];
int dp[10001][20][20];
bool check(int a,int b,int c){
if(b==c)return 0;
if(a==b)return 1;
P o=p[b]-p... | a.cc: In function 'int main()':
a.cc:45:26: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
45 | for(int i=0;i<n;i++)cin>>p[i].x>>p[i].y;
| ~~~^~
| |
| std::istream ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.