submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s027732704 | 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];
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... | a.cc: In function 'int cal()':
a.cc:38:23: error: expected ';' before 'dp'
38 | if(cs>r)return ans
| ^
| ;
39 | dp[i][j][k]=1;
| ~~
|
s473720615 | p01350 | C++ | #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
using namespace std;
typedef pair<long long int, long long int> P;
long long int INF = 1e18;
#define MAX_V 2... | a.cc:36:15: error: redefinition of 'long long int INF'
36 | long long int INF = 1e18;
| ^~~
a.cc:17:15: note: 'long long int INF' previously defined here
17 | long long int INF = 1e18;
| ^~~
a.cc:160:5: error: redefinition of 'int V'
160 | int V;
| ^
a.cc:43:5: ... |
s702351495 | p01350 | C++ | #define _USE_MATH_DEFINES
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
struct State {
int cur, prev, carrot;
double d;
State(int cur_, int prev_, int carrot_, double d_) {
cur = cur_;
prev = prev_;
carrot = carrot_;
d = d_;
}
bool operator<(const State& right) const {
return d > r... | a.cc: In function 'int main()':
a.cc:47:53: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::tuple<int, int, int>; _Tp = double; _Hash = std::hash<std::tuple<int, int, int> >; _Pred = std::equal_to<std::tuple<int, int, int> >; _Alloc = std::allocator... |
s701197780 | p01350 | C++ | #include<iostream>
#include<complex>
#include<vector>
#include<queue>
#include<cmath>
#include<map>
using namespace std;
typedef complex<double> P;
const double EPS=0.000000001;
const double INF=1000000;
double r,theta;
double memo[10001][20][20];
bool is_ok(P a,P b,P c){
P in=b-a,out=c-b;
double dot=in.real()*ou... | a.cc: In function 'int main()':
a.cc:60:9: error: 'memset' was not declared in this scope
60 | memset(ok,false,sizeof(ok));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<map>
+++ |+#include <cstring... |
s240513172 | p01350 | C++ | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#in... | a.cc: In function 'int main()':
a.cc:111:35: error: 'dist' was not declared in this scope
111 | if(s.remaining_distance - dist - EPS < 0) continue;
| ^~~~
|
s869056106 | p01351 | C++ | #include <iostream>
#include <cstdlib>
#define zmin(a,b) a=(a<b&&a>0?a:b)
using namespace std;
int gcd(int a, int b){
return ( b == 0 ) ? a : gcd(b, a%b);
}
int main(){
double m,n,a,b,c,d;
// while(cin>>m>>n>>a>>b>>c>>d,m){
cin>>m>>n>>a>>b>>c>>d;
int x1,x2,y1,y2,s;
if(a*d-b*c){
x1=d*m/(a*d-b*c);
y1=-b*m/(a*d... | a.cc: In function 'int main()':
a.cc:25:26: error: invalid operands of types 'int' and 'double' to binary 'operator%'
25 | x%=m;y%=n;
| ~^~~
a.cc:25:26: note: in evaluation of 'operator%=(int, double)'
a.cc:25:31: error: invalid operands of types 'int' and 'dou... |
s842084869 | p01351 | C++ | #include <iostream>
#include <cstdlib>
#define zmin(a,b) a=(a<b&&a>0?a:b)
using namespace std;
int gcd(int a, int b){
return ( b == 0 ) ? a : gcd(b, a%b);
}
int main(){
double m,n,a,b,c,d;
// while(cin>>m>>n>>a>>b>>c>>d,m){
cin>>m>>n>>a>>b>>c>>d;
int x1,x2,y1,y2,s;
if(a*d-b*c){
x1=d*m/(a*d-b*c);
y1=-b*m/(a*d... | a.cc: In function 'int main()':
a.cc:25:27: error: 'fmod' was not declared in this scope
25 | x=fmod(x,m);y=fmod(y,n);
| ^~~~
a.cc:29:27: error: 'fmod' was not declared in this scope
29 | x=fmod(x,m);y=fmod(y,n);
| ... |
s223908208 | p01352 | Java |
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
public class Main {
static ArrayList<List<Integer>>[] questions;
static int N;
static DJSet ds;
static String[] ans;
static int k;
@SuppressWarnings("unc... | Main.java:198: error: class, interface, enum, or record expected
}
^
1 error
|
s428007506 | p01352 | Java | import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
public class GraphConstruction {
static ArrayList<List<Integer>>[] questions;
static int N;
static DJSet ds;
... | Main.java:10: error: class GraphConstruction is public, should be declared in a file named GraphConstruction.java
public class GraphConstruction {
^
1 error
|
s265739339 | p01352 | C++ | #include <bits/stdc++.h>
#define set unordered_set
#define map unordered_map
using namespace std;
class UnionFind {
private:
int size;
int parent[40000];
int rank[40000];
public:
UnionFind() {}
UnionFind(int sz) {
init(sz);
}
void init(int sz) {
size = sz;
fill(rank, rank+sz, 0);
for (int i = 0; i < ... | a.cc: In function 'int main()':
a.cc:126:19: error: request for member 'push_back' in 'Q', which is of non-class type 'Query [40000]'
126 | Q.push_back((Query){t, u, v});
| ^~~~~~~~~
|
s201863433 | p01352 | C++ | import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
public class Main {
static ArrayList<List<Integer>>[] questions;
static int N;
static DJSet ds;
static String[] ans;
@SuppressWarnings("unchecked")
public ... | a.cc:14:9: error: stray '@' in program
14 | @SuppressWarnings("unchecked")
| ^
a.cc:80:17: error: stray '@' in program
80 | @SuppressWarnings("unchecked")
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.ArrayDeque;
| ^~~... |
s627713951 | p01352 | C++ | #include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <vector>
#pragma warning(disable : 4996)
using namespace std;
map<pair<int, int>, int> dt;
int N, Q, cur, cs, tp[40009], a[40009], b[40009], es[40009], id[40009], seq[40009]; bool vis[40009]; vector<int> g[40009], gs[40009];
void dfs(int pos) {
... | a.cc: In function 'int main()':
a.cc:61:52: error: 'find' was not declared in this scope
61 | gs[id[a[j]]].erase(find(gs[id[a[j]]].begin(), gs[id[a[j]]].end(), id[b[j]]));
| ^~~~
|
s542478839 | p01353 | C++ | // #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex... | a.cc: In function 'int main()':
a.cc:110:9: error: expected primary-expression before ']' token
110 | ]
| ^
a.cc:116:2: error: expected '}' at end of input
116 | }
| ^
a.cc:44:15: note: to match this '{'
44 | signed main() {
| ^
|
s640403667 | p01353 | C++ | #include <bits/stdc++.h>
using namespace std;
#define reep(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) reep((i),0,(n))
typedef pair<int,int> pii;
typedef pair<double,pii> P;
typedef long long ll;
#define mkp make_pair
#define F first
#define S second
#define int long long
// struct P {
// double first;
// pii se... | a.cc: In function 'int main()':
a.cc:33:25: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type, int)'
33 | a[i]=max(a[i]-d[0],0);
| ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/algor... |
s366457843 | p01353 | C++ | #include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se... | a.cc: In function 'long int solve()':
a.cc:57:3: error: 'else' without a previous 'if'
57 | else return ret;
| ^~~~
|
s607218023 | p01353 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <tuple>
#include <cmath>
using namespace std;
typedef tuple<double,int,int> T;// ??????/????????????????????°, ??????, ???????????°
int main(){
int N;
cin>>N;
vector<int64_t> H(N+1), A(N+1), D(N+1), S(N+1);
for(int i=0;i<=N;i++){
... | a.cc: In function 'int main()':
a.cc:20:33: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type, long long int)'
20 | if(S[i]>S[0])damage+=max(A[i]-D[0],0LL);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/... |
s625594168 | p01353 | C++ | #include <bits/stdc++.h>
#define FOR(i,k,n) for(int i=(k);i<(int)(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) begin(x),end(x)
using namespace std;
int main() {
int64_t n;
cin>>n;
using T = tuple<int64_t,int64_t,int64_t,int64_t>;
vector<T> vc;
int64_t h0,a0,d0,s0;
cin>>h0>>a0>>d0>>s0;
REP(i,n) {
... | a.cc: In function 'int main()':
a.cc:18:24: error: no matching function for call to 'max(int64_t, int)'
18 | vc.emplace_back(max(a-d0,0),s,max(0,a0-d),h);
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bit... |
s458402415 | p01353 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto (a): (b))
#define all(v) (v).begin... | a.cc:44:12: error: template argument 1 is invalid
44 | vector<data> vec;
| ^
a.cc:44:12: error: template argument 2 is invalid
a.cc:45:1: error: reference to 'data' is ambiguous
45 | data zibun;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c... |
s463912740 | p01353 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
int n;
cin>>n;
ll hh,aa,dd,ss;
cin>>hh>>aa>>dd>>ss;
vector<ll> h(n),a(n),d(n),s(n);
for(int i=0;i<n;i++){
cin>>h[i]>>a[i]>>d[i]>>s[i];
}
ll res=0;
for(int i=0;i<n;i++){
if(ss<s[i]){
... | a.cc: In function 'int main()':
a.cc:17:21: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type, int)'
17 | res+=max(a[i]-dd,0);
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
... |
s837881013 | p01353 | C++ | Rabbit Plays Games! | a.cc:1:1: error: 'Rabbit' does not name a type
1 | Rabbit Plays Games!
| ^~~~~~
|
s029830438 | p01353 | C++ | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
struct data {
int turn, damage, idx;
data(int t, int d, int i):turn(t), damage(d), idx(i){}
bool operator<(const data& d) const {
return (double)damage / turn < (double)d.damage / d.turn;
}
};
int main() {
cin.t... | a.cc: In function 'int main()':
a.cc:27:20: error: template argument 1 is invalid
27 | vector<data> dat;
| ^
a.cc:27:20: error: template argument 2 is invalid
a.cc:28:13: error: request for member 'reserve' in 'dat', which is of non-class type 'int'
28 | dat.reserve(n);
... |
s645445794 | p01354 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
using namespace std;
const int MAX_N = 16;
const int MAX_M = 16;
const double EPS = 1e-10;
double dp[1<<MAX_M][MAX_N];
double prob[MAX_M][MAX_N];
int M, N;
double dfs(int b, int x){
if(x == N) return 1.0;
if(b == (1<<M)-1){
return 0.0;
}
if(dp[b][... | a.cc: In function 'int main()':
a.cc:43:3: error: 'memset' was not declared in this scope
43 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <cstdio>
+++ |+#include <cstring>
4 |... |
s647335727 | p01354 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
class HashVI { // ???????????\??¢??°???????????§??????
public:
size_t operator()(pair<int,vector<int>> x) const {
si... | a.cc: In function 'int main()':
a.cc:70:27: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
70 | ld ans = check(0, vector<int>(M, true));
| ^~~~~~~~~~~~~~~~~~~~
a.cc:37:36: note: initializing argument 2 of 'ld... |
s159247268 | p01354 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
class HashVI { // ???????????\??¢??°???????????§??????
public:
size_t operator()(pair<int,vector<int>> x) const {
si... | a.cc: In function 'int main()':
a.cc:70:27: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
70 | ld ans = check(0, vector<int>(M, 1));
| ^~~~~~~~~~~~~~~~~
a.cc:37:36: note: initializing argument 2 of 'ld check... |
s903013816 | p01354 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
int m;
double dp[17][(1 << 16) + 1];
double P[17][17];
int main() {
scanf("%d%d", &m, &n);
for (int i=0; i<m; i++) {
for (int j=0; j<n; j++) {
scanf("%lf", &P[i][j]);
}
}
int lim = 1 << m;
for (int i=n-1; i>=0; --i) {
for (int st=0; st<... | a.cc: In function 'int main()':
a.cc:26:20: error: 'k' was not declared in this scope
26 | cand += dp[k][nst]*(1-P[j][i]);
| ^
|
s575823060 | p01354 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
typedef float double;
real dp[17][17][1 << 16];
int n, m;
real p[17][17];
real solve(int stage, int now, int cats){
real &res = dp[stage][now][cats];
if(res != -1)return res;
res = 0;
if((1<<now) & cats)return res;
if(stage == n)return r... | a.cc:5:9: error: multiple types in one declaration
5 | typedef float double;
| ^~~~~
a.cc:5:15: error: declaration does not declare anything [-fpermissive]
5 | typedef float double;
| ^~~~~~
a.cc:7:1: error: 'real' does not name a type
7 | real dp[17][17][1 << 16];
| ... |
s460099980 | p01356 | Java | import java.util.*;
public class main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long m = sc.nextLong();
long a = sc.nextLong();
long b = sc.nextLong();
long p = sc.nextLong();
long q = sc.nextLong();
long INF = 1000_000_000_000_000L;
if (... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s111100202 | p01356 | Java | import java.util.*;
public class main {
public static void Main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long m = sc.nextLong();
long a = sc.nextLong();
long b = sc.nextLong();
long p = sc.nextLong();
long q = sc.nextLong();
long INF = 1000_000_000_000_000L;
if (... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s896665059 | p01356 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
long long dist[40];
int main(){
long long a,b,c,d,e,f;
scanf("%lld%lld%lld%lld%lld%lld",&a,&b,&c,&d,&e,&f);
if(c==1&&d==1){
long long v=b%(e+f);
long long g=b/(e+f);
printf("%lld\n",v+max(0,g-a));
return 0;
}
int sz=0;
for(int i=0;i<=a;i++){
lon... | a.cc: In function 'int main()':
a.cc:11:38: error: no matching function for call to 'max(int, long long int)'
11 | printf("%lld\n",v+max(0,g-a));
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/include/c++... |
s496997865 | p01356 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long m = sc.nextLong();
long a = sc.nextLong();
long b = sc.nextLong();
long p = sc.nextLong();
long q = sc.nextLong();
long INF = 1000_000_000_000_000L;
if (... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s761338473 | p01356 | C++ | #include<iostream>
#include<vector>
using namespace std;
typedef long long ll;
int main(){
ll n,m,a,b,p,q;
cin >> n >> m >> a >> b >> p >> q;
if(a == 1 && b == 1){
cout << max( m%(p+q) , m-(p+q)*n ) << endl;
}
else {
vector<ll> vec;
ll s = 1 , t = 1;
for(int i = 0 ; i < n ; i ++){
if(p*s+q*t > m)bre... | a.cc: In function 'int main()':
a.cc:39:17: error: 'sort' was not declared in this scope; did you mean 'short'?
39 | sort(B.begin(),B.end());
| ^~~~
| short
a.cc:42:33: error: 'upper_bound' was not declared in this scope
42 | int ... |
s878908519 | p01356 | C++ | #include<iostream>
#include<vector>
using namespace std;
typedef long long ll;
int main(){
ll n,m,a,b,p,q;
cin >> n >> m >> a >> b >> p >> q;
if(a == 1 && b == 1){
cout << max( m%(p+q) , m-(p+q)*n ) << endl;
}
else {
vector<ll> vec;
ll s = 1 , t = 1;
for(int i = 0 ; i < n ; i ++){
if(p*s+q*t > m)bre... | a.cc: In function 'int main()':
a.cc:39:17: error: 'sort' was not declared in this scope; did you mean 'short'?
39 | sort(B.begin(),B.end());
| ^~~~
| short
a.cc:42:33: error: 'upper_bound' was not declared in this scope
42 | int ... |
s473452714 | p01356 | C++ | #include<iostream>
#include<vector>
using namespace std;
typedef long long ll;
int main(){
ll n,m,a,b,p,q;
cin >> n >> m >> a >> b >> p >> q;
if(a == 1 && b == 1){
cout << max( m%(p+q) , m-(p+q)*n ) << endl;
}
else {
vector<ll> vec;
ll s = 1 , t = 1;
for(int i = 0 ; i < n ; i ++){
if(p*s+q*t > m)bre... | a.cc: In function 'int main()':
a.cc:39:17: error: 'sort' was not declared in this scope; did you mean 'short'?
39 | sort(B.begin(),B.end());
| ^~~~
| short
a.cc:42:33: error: 'upper_bound' was not declared in this scope
42 | int ... |
s739574293 | p01356 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
template<typename A,typename B>inline ... | a.cc: In function 'int main()':
a.cc:47:20: error: expected primary-expression before '||' token
47 | if(1.0*x*A>||1.0*y*B>1e15||x+y>M)break;
| ^~
|
s482122212 | p01356 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll INF=10000000000000000LL;
ll mul(ll a,ll b){
if(a>INF/b)return INF;
return a*b;
}
ll n,m,a,b,p,q;
void dfs(ll x,ll sum,vector<ll> &t,vector<ll> &T){
if(x==(int)t.size()){
T.push_back(sum);
}else{
dfs(x+1,sum,t,T);
dfs(x+1,min(IN... | a.cc: In function 'll solve()':
a.cc:32:21: error: no matching function for call to 'min(ll&, int)'
32 | for(int i=0;i< min(n,40) ;i++){
| ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s180132522 | p01356 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll INF=10000000000000000LL;
ll mul(ll a,ll b){
if(a>INF/b)return INF;
return a*b;
}
ll n,m,a,b,p,q;
void dfs(ll x,ll sum,vector<ll> &t,vector<ll> &T){
if(x==(int)t.size()){
T.push_back(sum);
}else{
dfs(x+1,sum,t,T);
dfs(x+1,min(IN... | a.cc: In function 'll solve()':
a.cc:36:15: error: expected ';' before ')' token
36 | return m%d);
| ^
| ;
a.cc:36:15: error: expected primary-expression before ')' token
|
s798102189 | p01356 | C++ | // g++ -std=c++11 a.cpp
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<unordered_map>
#include<utility>
#include<cmath>
#include<random>
#include<cstring>
#include<queue>
#include<stack>
#include<bitset>
#include<cstdio>
#include<sstream>
#include<iomani... | a.cc:131:1: error: expected unqualified-id before numeric constant
131 | 0
| ^
|
s972428312 | p01357 | C++ | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> i_i;
int MOD = 1000000007;
int main() {
int n; cin >> n;
vector<vector<int> > a(n, vector<int>(6, INT_MIN));
vector<vector<i_i> > p(6, vecto... | a.cc: In function 'int main()':
a.cc:15:50: error: 'INT_MIN' was not declared in this scope
15 | vector<vector<int> > a(n, vector<int>(6, INT_MIN));
| ^~~~~~~
a.cc:5:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding ... |
s108974798 | p01358 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s773466874 | p01358 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <cstring>
#include <functional>
#include <cmath>
#include <complex>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define rep1(i,n) for(in... | a.cc: In function 'int main()':
a.cc:54:17: error: 'retrun' was not declared in this scope
54 | retrun 0;
| ^~~~~~
|
s830245107 | p01358 | C++ |
import java.awt.Point;
import java.io.*;
import java.util.*;
public class Main {
FastScanner in = new FastScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
public void run() {
int n = in.nextInt(), u = in.nextInt(), v = in.nextInt(), m = in.nextInt();
HashMap<Integer, Point> rabbit = new H... | a.cc:2:1: error: 'import' does not name a type
2 | import java.awt.Point;
| ^~~~~~
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.io.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:... |
s510241093 | p01358 | C++ | #include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);++i)
#define rep(i,n) REP(i, 0, n)
typedef long long int i64;
typedef pair<int, int> pint;
map<int, pint> usam, nekom;
int usum[2][501], nsum[2][501];
int m[100000];
int main() {
int N, U, V, ... | a.cc: In function 'int main()':
a.cc:19:9: error: 'memo' was not declared in this scope
19 | memo[num] = 1;
| ^~~~
a.cc:24:9: error: 'memo' was not declared in this scope
24 | memo[num] = 1;
| ^~~~
|
s118098294 | p01358 | C++ | #include <iostream>
#include <string>
using namespace std;
int U[500][500];
int N[500][500];
int n, u, v, m;
string judge(){
int a = 0, b = 0;
bool f, g;
for(int i = 0; i < n; ++i){
f = true, g = true;
for(int j = 0; j < n; ++j){
if(U[i][j]) f = false;
if(U[j][i]) g = false;
}
if(f) +... | /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
|
s431971633 | p01358 | C++ | #include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "../dump.hpp"
#else
#define dump(...)
#endif
#define rep(i,n) for(ll i=0,i##_cond=(n);i<i##_cond;i++)
#define FOR(i,a,b) for(ll i=(a),i##_cond=(b);i<i##_cond;i++)
#define ROF(i,a,b) for(ll i=(a)-1,i##_cond=(b);i>=i##_cond;i--)
#define all(a) (a).begin... | a.cc:97:11: warning: missing terminating " character
97 | cout << "DRAW\
| ^
a.cc:97:11: error: missing terminating " character
97 | cout << "DRAW\
| ^~~~~~
98 | }
| ~
a.cc:34:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3... |
s500824149 | p01358 | C++ | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
sys.setrecursionlimit(1000000)
n, u, v, m = map(int, raw_input().split())
m1 = {}
m2 = {}
for i in range(n):
lst_ = map(int, raw_input().split())
for j in range(n):
l = [i, n + j]
if i == j:
l.... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python
| ^
a.cc:3:1: error: 'from' does not name a type
3 | from collections import deque
| ^~~~
a.cc:12:1: error: 'm2' does not name a type
12 | m2 = {}
| ^~
a.cc:14:1: error: expected unqualified-id before 'for'
14... |
s643599823 | p01359 | 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: cannot find symbol
public Era(int begin,int end,Stirng name){
^
symbol: class Stirng
location: class Era
1 error
|
s365309673 | p01359 | Java | import java.util.*;
public class MainSix {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int n = sc.nextInt();
int q = sc.nextInt();
if (n == 0 && q == 0)
break;
int[] begin = new int[n];
int[] end = new int[n];
String[] era = new String[n];
... | Main.java:3: error: class MainSix is public, should be declared in a file named MainSix.java
public class MainSix {
^
1 error
|
s841232073 | p01359 | C | #include <iostream>
#include <cstring>
#include <cstdio>
#include <queue>
#include <vector>
#include <algorithm>
using namespace std;
const int N=10006, INF=0x3fffffff;
int dis[N];
bool vs[N], n, m;
struct data {
int u, dis, cost;
data() {}
data(int _u, int _dis, int _cost) : u(_u), dis(_dis), cost(_cost... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s223356740 | p01359 | C | #include<stdio.h>
struct D{int f,e;char n[20];};
int N,Q,i,q;
D Y[1005];
int main()
{
for(;scanf("%d%d",&N,&Q),N;)
{
for(i=0;i<N;Y[i].f=Y[i].e-Y[i].f+1,i++)
scanf("%s%d%d",Y[i].n,&Y[i].f,&Y[i].e);
for(;Q--;)
{
scanf("%d",&q);
for(i=0;i<N;i++)
if(Y[i].f<=q&&q<=Y[i].e)
{
printf("%s %d\n",Y[i... | main.c:4:1: error: unknown type name 'D'; use 'struct' keyword to refer to the type
4 | D Y[1005];
| ^
| struct
main.c: In function 'main':
main.c:9:33: error: request for member 'f' in something not a structure or union
9 | for(i=0;i<N;Y[i].f=Y[i].e-Y[i].f+1,i++)
| ... |
s200021984 | p01359 | C++ | // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2242
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int WY[(int)1e9+10][2];
string EBY[1010];
int N, Q;
int main() {
while (cin >> N >> Q && N) {
fill(&WY[0][0], &WY[0][0]+((int)1e9+10)*2, 0);
fill(EBY, EBY+1010, "... | /tmp/cccclAkQ.o: in function `main':
a.cc:(.text+0x43): relocation truncated to fit: R_X86_64_PC32 against symbol `EBY[abi:cxx11]' defined in .bss section in /tmp/cccclAkQ.o
a.cc:(.text+0x54): relocation truncated to fit: R_X86_64_PC32 against symbol `EBY[abi:cxx11]' defined in .bss section in /tmp/cccclAkQ.o
a.cc:(.te... |
s600959852 | p01359 | C++ | #include<iostream>
using namespace std;
class calender{
public:
string s;
int ey,wy;
bool operator<(const calender &a)const{
return wy < a.wy;
}
};
int main(){
int n,q;
while(cin>>n>>q,n){
calender c[1000];
for(int i=0;i<n;i++)cin>>c[i].s>>c[i].ey>>c[i].wy;
sort(c,c+n);
for(int i=0;i<q;... | a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(c,c+n);
| ^~~~
| short
|
s272047829 | p01359 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
struct era{
int s,e;
string name;
bool operator<(const era&e)const{
return s < e.s;
}
};
int main(){
int n,q;
int i,j,k;
era e;
string str;
int b,w;
cin >> n >> q;
while(n+q!=0){
vector<era> v;
for(i=0;i<n;i++){
... | a.cc: In function 'int main()':
a.cc:27:5: error: 'sort' was not declared in this scope; did you mean 'short'?
27 | sort(v.begin(),v.end());
| ^~~~
| short
|
s657603745 | p01359 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
struct P {
int start, end;
string name;
P(int s, int e, string n) : start(s), end(e), name(n) { }
};
bool operator < (P a, P b) {
return a.start != b.start ? a.start < b.start : a.end < b.end;
}
int main() {
for(int N, Q; cin >> ... | a.cc: In function 'int main()':
a.cc:30:5: error: 'sort' was not declared in this scope; did you mean 'short'?
30 | sort(ps.begin(), ps.end());
| ^~~~
| short
|
s979252558 | p01359 | C++ | #include <stack>
#include <utility>
#include <iostream>
#include <string>
#include <set>
#include <algorithm>
#include <map>
using namespace std;
int main()
{
int n, q;
while (cin >> n >> q) {
if (n == 0)break;
map<string,pair< int,int>> his;
string str[1009];
int b,c;
string a;
for (int i = 0; i < n; i+... | a.cc: In function 'int main()':
a.cc:24:39: error: 'INT_MAX' was not declared in this scope
24 | cin >> b; c = INT_MAX / 2; int k;
| ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <cl... |
s393412829 | p01359 | C++ | #include<iostream>
#include<string>
using namespace std;
string a[1000];
int time[1000][2];
int main(){
int n,m,z;
while(true){
cin>>n>>m;
if(n==0&&m==0)break;
for(int i=0;i<n;i++){
cin>>a[i];
cin>>z>>time[i][1];
time[i][0]=time[i][1]-z;
}
for(int u=0;u<m;u++){
string ans="Unknown";
int cnt=-1;
cin>>... | a.cc:5:17: error: 'int time [1000][2]' redeclared as different kind of entity
5 | int time[1000][2];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/1... |
s062049128 | p01359 | C++ | #include <string>
#include <iostream>
using namespace std;
int N, Q, v[1000], w[1000], x; char s[1000][20];
int main() {
while (cin >> N >> Q, N | Q) {
for (int i = 0; i < N; i++) scanf("%s%d%d", s[i], &v[i], &w[i]);
for (int i = 0; i < Q; i++) {
scanf("%d", &x); int f = 0;
for (int j = 0; j < N; j++) {
... | a.cc: In function 'int main()':
a.cc:12:77: error: invalid types 'int[int]' for array subscript
12 | printf("%d %d\n", s[j], x - w[j] + j[j]); f = 1; break;
| ^
|
s784539098 | p01359 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
vector<pair<int, pair<int, string> > > data;
int val;
int get_era(int q){
int tmp = -1;
for(int i=0;i<data.size();i++){
if(data[i].first <= q && q <= (data[i].second).first){
val = q-data[i].first;
return... | a.cc: In function 'int get_era(int)':
a.cc:14:17: error: reference to 'data' is ambiguous
14 | for(int i=0;i<data.size();i++){
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++... |
s196492675 | p01359 | C++ | #include <vector>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
int N, Q;
while (cin >> N >> Q, N || Q) {
vector<pair<int, string> > memo;
for (int i = 0; i < N; i++) {
string s;
int ey, wy;
cin >> s >> ey >> wy;
memo.p... | a.cc: In function 'int main()':
a.cc:11:12: error: 'cin' was not declared in this scope
11 | while (cin >> N >> Q, N || Q) {
| ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #include <algorithm>
+++ |+#include ... |
s355322981 | p01359 | 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... |
s027390034 | p01359 | 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... |
s700460328 | p01359 | 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:79:12: error: 'lli' was not declared in this scope
79 | typedef pr<lli,lli> pll;
| ^~~
a.cc:79:16: error: 'lli' was not declared in this scope
79 | typedef pr<lli,lli> pll;
| ^~~
a.cc:79:19: error: template argument 1 is invalid
79 | typedef pr<lli,lli> pll;
| ... |
s740461222 | p01359 | 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... |
s443506647 | p01360 | 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:29:10: error: 'gets' was not declared in this scope; did you mean 'getw'?
29 | while (gets(seq), seq[0] != '#') {
| ^~~~
| getw
|
s105535629 | p01360 | C++ | #include <iostream>
#include <fstream>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <s... | a.cc: In function 'int main()':
a.cc:49:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
49 | while(gets(c)){
| ^~~~
| getw
|
s536441920 | p01360 | C++ | #include <iostream>
#include <fstream>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <s... | a.cc:55:50: error: macro "rep" passed 3 arguments, but takes just 2
55 | rep(j,2)rep(k,4)rep(l,k,4)dp[cur][j][k][l]=INF;
| ^
a.cc:33:9: note: macro "rep" defined here
33 | #define rep(i,n) rep2(i,0,n)
| ^~~
a.cc: In funct... |
s623403845 | p01360 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
char str[1000001];
int num[100001];
int ans;
int size;
int step(int l,int r,int w){
int res=0;
int a;
for(a=1;a<=size;a++){
if(num[a]%3==1){
if(w==0){
if(l==1)r=1,w=1;
else res++,l=1,w=0;
}else l=1,w=0;
}
if(num[a]%3==2){
if(w==0){
... | a.cc: In function 'int step(int, int, int)':
a.cc:12:20: error: reference to 'size' is ambiguous
12 | for(a=1;a<=size;a++){
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/inclu... |
s090497830 | p01360 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
char str[1000001];
int num[100001];
int ans;
int size;
int step(int l,int r,int w){
int res=0;
int a;
for(a=1;a<=size;a++){
if(num[a]%3==1){
if(w==0){
if(l==1)r=1,w=1;
else res++,l=1,w=0;
}else l=1,w=0;
}
if(num[a]%3==2){
... | a.cc: In function 'int step(int, int, int)':
a.cc:13:20: error: reference to 'size' is ambiguous
13 | for(a=1;a<=size;a++){
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/inclu... |
s545282873 | p01361 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=... | a.cc: In function 'int main()':
a.cc:37:9: error: redeclaration of 'int cy'
37 | int cy=0,cx=0; ... |
s501799066 | p01361 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, 1, -1};
int main(){
int dmg[26];
string mp[100];
int HP, HPmax;
int reg[12];
int dp[2][1<<12];
while(cin >> HP >> HPmax, HP){
int R, C; fin >> R >> C;
for(int i=0;i<R;i++) cin >> mp[i];
... | a.cc: In function 'int main()':
a.cc:17:27: error: 'fin' was not declared in this scope
17 | int R, C; fin >> R >> C;
| ^~~
a.cc:37:17: error: 'memset' was not declared in this scope
37 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc... |
s348933262 | p01361 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, 1, -1};
int main(){
int dmg[26];
string mp[100];
int HP, HPmax;
int reg[12];
int dp[2][1<<12];
while(cin >> HP >> HPmax, HP){
int R, C; cin >> R >> C;
for(int i=0;i<R;i++) cin >> mp[i];
... | a.cc: In function 'int main()':
a.cc:37:17: error: 'memset' was not declared in this scope
37 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ ... |
s724998683 | p01361 | C++ | #include <iostream>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
using namespace std;
int init, MAX;
int R, C;
bool dp[1010][1 << 13];
int num[1010][1 << 13];
char a[110][110];
int num[300];
int tot, S, P;
int sum[1010];
int nump, p[20], ok[1 << 13];
int x[1010], y[1010];
void pre() {... | a.cc:14:5: error: conflicting declaration 'int num [300]'
14 | int num[300];
| ^~~
a.cc:12:5: note: previous declaration as 'int num [1010][8192]'
12 | int num[1010][1 << 13];
| ^~~
a.cc: In function 'bool solve()':
a.cc:43:47: error: invalid operands of types 'int' and 'int [8192]' to binary ... |
s185045668 | p01362 | C++ | #include<bits/stdc++.h>
using namespace std;
string tmp[6];
void rotN() {
string t = tmp[0];
tmp[0] = tmp[5];
tmp[5] = tmp[2];
tmp[2] = tmp[4];
tmp[4] = tmp[0];
t = tmp[2];
tmp[2][0] = t[6];
tmp[2][1] = t[7];
tmp[2][2] = t[8];
tmp[2][6] = t[0];
tmp[2][7] = t[1];
tmp[2][8] = t[2];
t = tmp... | a.cc:160:27: error: stray '#' in program
160 | else sum += i;#include<bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:160:28: error: 'include' was not declared in this scope
160 | else sum += i;#include<bits/stdc++.h>
| ... |
s220538748 | p01364 | C++ | #include <iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include <cstring>
#define MAXV 2000
#define PI 3.14159265358979323846
#define eps 1e-8
#define zero(x) (fabs(x)<eps)
#define SGN(x) ((x)>eps?1:((x)>-eps?0:-1))
#define _sign(x) ((x)>eps?1:((x)<-eps?2:0))
using namespace std;
//莠檎サエ轤ケ
struct pt... | a.cc:34:1: error: expected unqualified-id before '{' token
34 | {
| ^
a.cc: In function 'int main()':
a.cc:73:23: error: 'rotatee' was not declared in this scope
73 | lef = rotatee(lef,z,-d1/dis(lef,z),1);
| ^~~~~~~
a.cc:81:27: error: 'rotatee' was not declared in... |
s158704479 | p01364 | C++ | #include <iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include <cstring>
#define MAXV 2000
#define PI 3.14159265358979323846
#define eps 1e-8
#define zero(x) (fabs(x)<eps)
#define SGN(x) ((x)>eps?1:((x)>-eps?0:-1))
#define _sign(x) ((x)>eps?1:((x)<-eps?2:0))
using namespace std;
//莠檎サエ轤ケ
struct pt... | a.cc:34:1: error: expected unqualified-id before '{' token
34 | {
| ^
a.cc: In function 'int main()':
a.cc:74:23: error: 'rotatee' was not declared in this scope
74 | lef = rotatee(lef,z,-d1/dis(lef,z),1);
| ^~~~~~~
a.cc:82:27: error: 'rotatee' was not declared in... |
s562141437 | p01365 | C++ | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define INF 1000000007LL
#define fir first
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<n;i++)
#define pi pair<int,int>
#define pb push_back
#define sec second
#define sz size()
struct edge{
int to, dist, cost;
edge(int t,... | a.cc: In function 'int main()':
a.cc:63:17: error: 'sort' was not declared in this scope; did you mean 'short'?
63 | sort(city,city+N);
| ^~~~
| short
|
s628571402 | p01366 | C | //
// Create by Running Photon on 2015-04-02
//
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <algorithm>
#include <cctype>
#include <stack>
#include <queue>
#include <map>
#include <string>
#include <set>
#include <vector>
using namespace std;... | main.c:5:10: fatal error: iostream: No such file or directory
5 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s906646461 | p01366 | C | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
#include<algorithm>
#include<math.h>
#include<queue>
using namespace std;
typedef long long ll;
const int maxn=10010,INF=99999999;
int ip,n,m,head[maxn],dis[maxn],jl[maxn];
bool vis[maxn];
struct data
{
int nex... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s625251252 | p01366 | C | //YPZ_YPZ_YPZ_YPZ_YPZ
#include<algorithm>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<set>
#include<queue>
#define ll long long
#define RG register
#define il inline
#define inf 1073741824
#define rep(i,a,b) for(register int i=a;i<=b;++i)
#define file(a) freopen(a".... | main.c:2:9: fatal error: algorithm: No such file or directory
2 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s970667085 | p01366 | C | #include<iostream>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<queue>
#include<vector>
#include<stack>
#define ls k<<1
#define rs k<<1|1
#define RG register
#define MAXN 50010
#define LL long long int
using namespace std;
const int INF=0x7fffffff;
struct node{
int ... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s374967629 | p01366 | C | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<queue>
#define ll long long
using namespace std;
const int N = 10010;
const int M = 20010;
int n,m,e_num,ans,k;
int nxt[M*2],to[M*2],w[M*2],h[N],dis[N],fa[N],pre[N],bl[M*2],val[M*2];
bool in[N];
struc... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s264081220 | p01366 | C | #include<iostream>
#include<cstring>
#include<queue>
using namespace std;
struct qnode
{
int v,c,d;
qnode(int _v=0,int _c=0,int _d=0):v(_v),c(_c),d(_d){}
bool operator <(const qnode &r)const
{
return c>r.c;
}
};
struct qwer{
int to,val,cost,nex;
} a[40010];
int head[10010],now,dis[10010]... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s079838627 | p01366 | C | /*
* main.cpp
*
* Created on: 2013-7-28
* Author: whd
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<queue>
#define pb push_back
#define mp make_pair
using n... | main.c:7:9: fatal error: cstdio: No such file or directory
7 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s204927467 | p01366 | C | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <set>
#include <queue>
#include <stack>
using namespace std;
int N,M;
int head[11000];
struct Edge
{
int from;
int to;
i... | main.c:1:10: fatal error: cstdlib: No such file or directory
1 | #include <cstdlib>
| ^~~~~~~~~
compilation terminated.
|
s133002102 | p01366 | C | #include<stdio.h>
#include<utility>
#include<queue>
#include<vector>
#include<algorithm>
#define MAX_N 10000
#define INF 100000000
using namespace std;
typedef pair<int,int>P;
typedef struct edge
{
int t,dist,cost;
} edge;
struct StructGreater {
bool operator() (edge a, edge b) {
return a.dist==b.dist?a.cost>b.c... | main.c:2:9: fatal error: utility: No such file or directory
2 | #include<utility>
| ^~~~~~~~~
compilation terminated.
|
s202418123 | p01366 | C++ | #include"stdafx.h"
#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<queue>
#include<string>
#include<cstdio>
#include<stack>
#include<memory.h>
#include<cmath>
#include<bitset>
#include<functional>
#include<memory>
#include<utility>
using namespace std;
#define FOR(i,m,n) for(i=m;i<n;i++)
... | a.cc:1:9: fatal error: stdafx.h: No such file or directory
1 | #include"stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s434757436 | p01366 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<queue>
#include<string>
#include<cstdio>
#include<stack>
#include<memory.h>
#include<cmath>
#include<bitset>
#include<functional>
#include<memory>
#include<utility>
using namespace std;
#define FOR(i,m,n) for(i=m;i<n;i++)
#define MIN(x,y) (x... | a.cc: In function 'int main()':
a.cc:68:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
68 | scanf_s("%d %d %d %d", &u, &v, &d, &c);
| ^~~~~~~
| scanf
|
s832200195 | p01366 | C++ | #include <iostream>
#include <string>
#include <queue>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <ctype.h>
#include <map>
#include <vector>
#include <algorithm>
#include <set>
#define ll long long
using namespace std;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int N = 100000+5;
// ... | a.cc: In function 'int main()':
a.cc:84:12: error: redeclaration of 'int ans'
84 | int ans=0;
| ^~~
a.cc:83:12: note: 'int ans' previously declared here
83 | int ans = 0;
| ^~~
|
s066541175 | p01366 | C++ | //
// main.cpp
// E - Road Construction
//
// Created by dhl on 2018/7/18.
// Copyright © 2018年 dhl. All rights reserved.
//
#include <iostream>
#include <vector>
using namespace std;
int n, m;
struct ac{
int e, len, pic;
ac() {}
ac (int &_e, int &_len, int &_pic) {
e = _e; len = _len; pic = _p... | a.cc: In function 'int dijkstra()':
a.cc:24:5: error: 'memset' was not declared in this scope
24 | memset(dis, INF, sizeof(dis));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include <vector>
+++ |+#include <cstr... |
s773795408 | p01366 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
typedef long long ll;
const int maxn=1e4+5,maxm=2e4+5;
const ll inf=1e18;
inline int fa(int u){ return u/2; }
inline int ls(int u){ return u*2; }
inline int rs(int u){ return u*2+1; }
struct heap{
int hea[maxn],pos[maxn],siz;
ll *dis;
heap(ll a[],int n){
dis... | a.cc: In constructor 'gragh::gragh()':
a.cc:54:17: error: 'memset' was not declared in this scope
54 | memset(head,-1,sizeof(head));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdi... |
s627712551 | p01366 | C++ | // AOJ 2249 (http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2249)
#include<cstdio>
#include<cstring>
#include<limits>
#include<queue>
#include<set>
#include<vector>
#define rep(i,a) for(int i=0;i<(a);++i)
#define itr(it,a) for(auto it=(a).begin();it!=(a).end();++it)
#define clr(a,v) memset((a),(v),sizeof(a))
... | a.cc: In function 'int main()':
a.cc:37:25: error: 'cost' was not declared in this scope; did you mean 'const'?
37 | cost[u][v] = cost[v][u] = c;
| ^~~~
| const
|
s759724804 | p01366 | C++ | #pragma warning (disable:4996)
#include<iostream>
#include<cstdio>
#include<queue>
#include<vector>
using namespace std;
const int maxn = 10050;
const int maxe = 2005000;
const int INF = 1e9;
struct note
{
int to;
int w;
int c;
int next;//next表示下一条相同起点不同终点边的编号
};
note edge[maxe];
int head[maxn... | a.cc: In function 'void init()':
a.cc:22:9: error: 'memset' was not declared in this scope
22 | memset(head, -1, sizeof(head));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<queue>
+++ |+#include <c... |
s280721040 | p01366 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <queue>
#include <functional>
using namespace std;
const int maxn = 10002;
const int maxm = 20002;
typedef pair<int, int> P;
struct Edge {
int to, d, c;
Edge() {}
Edge(int t, int d, int c) : to(t), d(d), c(c) {}
};
vector<Edge> g[maxn];
int... | a.cc: In function 'int main()':
a.cc:39:28: error: 'INT_MAX' was not declared in this scope
39 | fill(dis, dis+n+1, INT_MAX);
| ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
5 | #include <functi... |
s746078084 | p01366 | C++ | #include <bits/stdc++.h>
using namespace std;
struct UnionFind {
UnionFind(int n = 0): par(n, -1){}
int root(int x){
return par[x] < 0 ? x : par[x] = root(par[x]);
}
bool unite(int x, int y){
if ((x = root(x)) == (y = find(y))) return false;
if (par[x] > par[y]) swap(x, y);
par[x] += par[y];
par[y] = x;
... | a.cc: In constructor 'UnionFind::UnionFind(int)':
a.cc:5:31: error: class 'UnionFind' does not have any field named 'par'
5 | UnionFind(int n = 0): par(n, -1){}
| ^~~
a.cc: In member function 'int UnionFind::root(int)':
a.cc:7:24: error: 'par' was not declared in this sco... |
s770765114 | p01366 | C++ | #include?<iostream>
#include?<queue>
#include?<functional>
#include?<cstring>
using?namespace?std;
#define?MAX_V?10240
?
//?从?点from指向?点to的???cost的?
typedef?struct?edge
{
int?to,?distance,?cost;
edge(){}
edge(int?to,?int?distance,?int?cost)?:?to(to),?distance(distance),?cost(cost){}
};
?
//?first?当前最短路径?度,second当前?点?号
t... | a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include?<iostream>
| ^
a.cc:2:9: error: #include expects "FILENAME" or <FILENAME>
2 | #include?<queue>
| ^
a.cc:3:9: error: #include expects "FILENAME" or <FILENAME>
3 | #include?<functional>
| ^
a.cc:4... |
s686268031 | p01366 | C++ | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main{
public static void main(String[] args)throws Exception{
new Main().solve();
}
void solve(){
Scanner sc=new Scanner(System.in);
while(true){
int n=sc.nextIn... | a.cc:53:25: error: stray '@' in program
53 | @SuppressWarnings("unchecked")
| ^
a.cc:114:17: error: stray '@' in program
114 | @Override
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.ArrayList;... |
s436709804 | p01366 | C++ | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <queue>
using namespace std;
const int maxn=10050,maxm=20050,inf=0x3f3f3f3f;
struct Edge
{
int to,next,dis,cos ;
}edge[maxm*2];
struct Pair
{
int D,V,C;
Pair(){;}
Pair(int d,int c,int v)
{
D=d... | a.cc: In function 'int dijstra(int)':
a.cc:49:9: error: 'class std::priority_queue<Pair>' has no member named 'pus'; did you mean 'push'?
49 | que.pus
| ^~~
| push
a.cc:49:12: error: expected '}' at end of input
49 | que.pus
| ^
a.cc:42:1: note: to match this '... |
s357959304 | p01366 | C++ | #include <iostream>
#include <cstdio>
#include <queue>
using namespace std;
int n,m,head[10002],top,ans,vis[10002];
struct Edge{
int v,next,cost,dist;
Edge(){};
Edge(int a,int b,int c,int d)
{
v=a;dist=b;cost=c;next=d;
}
}edge[40002];
struct node
{
int v,dist,cost;
node(){}
node(int a,int b,int c){v=a;
di... | a.cc: In function 'void dijkstra()':
a.cc:42:9: error: 'memset' was not declared in this scope
42 | memset(vis,0,sizeof(vis));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++ |+#include <c... |
s578983762 | p01366 | C++ | #include <iostream>
#include <cstdio>
#include <queue>
#include <cstring>
using namespace std;
int n,m,head[10050],top,ans,vis[10050];
struct Edge{
int v,next,cost,dist;
Edge(){};
Edge(int a,int b,int c,int d)
{
v=a;dist=b;cost=c;next=d;
}
}edge[40100];
struct node
{
int v,dist,cost;
node(){}
node(int a,in... | a.cc: In function 'void add(int, int, int, int)':
a.cc:36:19: error: 'tem' was not declared in this scope; did you mean 'tm'?
36 | edge[top]=tem;
| ^~~
| tm
|
s295126520 | p01366 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cstring>
#include <vector>
#include <cmath>
#include <queue>
using namespace std;
#define Fill(a, b) memset(a, b, sizeof(a))
#define Debug(x) cout<<#x<<"="<<(x)<<endl;
typedef __int64 LL;
typedef pair<int, int> P;
const int inf = 0... | a.cc:13:9: error: '__int64' does not name a type; did you mean '__int64_t'?
13 | typedef __int64 LL;
| ^~~~~~~
| __int64_t
a.cc:16:7: error: 'LL' does not name a type
16 | const LL mod = 1000000007;
| ^~
|
s150647367 | p01366 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cstring>
#include <vector>
#include <cmath>
#include <queue>
using namespace std;
#define Fill(a, b) memset(a, b, sizeof(a))
#define Debug(x) cout<<#x<<"="<<(x)<<endl;
typedef pair<int, int> P;
const int inf = 0x1f1f1f1f;
const LL... | a.cc:16:7: error: 'LL' does not name a type
16 | const LL mod = 1000000007;
| ^~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.