submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s472265956 | p01865 | C++ | #include <iostream>
using namespace std;
int main() {
int L, N, i, j, k, l = 0, n = 1, weight = 0;
cin >> L >> N;
int x[5000], w[5000], xx[5000], ww[5000];
for (i = 0; i < N; i++) {
cin >> x[i] >> w[i];
weight = weight + x[i] * w[i];
}
j = 0;
if (weight > 0) {
l = L * -1 n = -1;
}
if (weight < ... | a.cc: In function 'int main()':
a.cc:22:27: error: expected ';' before 'n'
22 | l = L * -1 n = -1;
| ^~
| ;
|
s625634295 | p01865 | C++ | #include<iostream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<bitset>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
type... | a.cc:60:16: error: macro "pri" passed 2 arguments, but takes just 1
60 | pri(-x, w);
| ^
a.cc:35:9: note: macro "pri" defined here
35 | #define pri(x) cout << (x) << "\n"
| ^~~
a.cc: In function 'int main()':
a.cc:60:7: error: 'pri' was not declared in this scope
60 | ... |
s925948077 | p01866 | C | #include <stdio.h>
#include <string.h>
int main(void) {
int N;
char X[1024];
int D;
char YakusimaruHiroko[1024];
int YosinagaSayuri;
int MinaseInori;
if (scanf("%d", &N) != 1) return 1;
if (scanf("%s", X) != 1) return 1;
if (scanf("%d", &D) != 1) return 1;
YosinagaSayuri = D;
for (MinaseInori = 0; MinaseIno... | main.c:40:5: error: redefinition of 'main'
40 | int main(void) {
| ^~~~
main.c:4:5: note: previous definition of 'main' with type 'int(void)'
4 | int main(void) {
| ^~~~
|
s371522297 | p01866 | C++ | #include<stdio.h>
int N, D;
char data[1010];
char aaa[1010];
void input(){
scanf("%d\n", &N);
gets(data);
scanf("%d", &D);
}
void process(){
int cnt = 0;
for (int i = 0; i < N; ++i){
aaa[i] = '1';
cnt += aaa[i] != data[i];
}
if (cnt > D){
for (int i = N - 1; i >= 0; --i){
if (data[i] != aaa[i]) {
... | a.cc: In function 'void input()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(data);
| ^~~~
| getw
|
s878949414 | p01866 | C++ | #include<iostream>
#include<string>
using namespace std;
string S,T;int n,p;
int main(){
cin>>n>>S>>p;T=S
for(int i=0;i<S.size();i++){
if(p>=1 && S[i]=='0'){T[i]='1';p--;}
}
for(int i=S.size()-1;i>=0;i--){
if(p>=1 && S[i]=='1'){T[i]='0';p--;}
}
cout<<T<<endl;return 0;
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before 'for'
6 | cin>>n>>S>>p;T=S
| ^
| ;
7 | for(int i=0;i<S.size();i++){
| ~~~
a.cc:7:21: error: 'i' was not declared in this scope
7 | ... |
s903100116 | p01866 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string num;
cin >> num;
int hum;
cin >> hum;
vector<int> used(N);
int c = 0;
for (int i = 0; i < N && c < hum; i++) {
if (num[i] == '0') {
num[i] = '1';
c++;
used... | a.cc: In function 'int main()':
a.cc:24:19: error: 'i' was not declared in this scope
24 | if (!used[i]) {
| ^
|
s172768592 | p01867 | C++ | # -*- coding: utf-8 -*-
from collections import Counter
N = input()
S = input().split('+')
dic_chr_num = Counter(S)
dic_num_kind = Counter(dic_chr_num.values())
ans = 4 * len(dic_chr_num) - 1
for num, kind in dic_num_kind.items():
if num == 1:
ans -= 2 * kind
elif kind >= 2:
ans -= 2 * (kind... | a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:3:1: error: 'from' does not name a type
3 | from collections import Counter
| ^~~~
|
s927742257 | p01867 | C++ | #include<stdio.h>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int n;
char data[500];
vector<pair<int, char>> cnt(26);
int length;
void input(){
scanf("%d\n", &n);
gets(data);
for (int i = 0; i < n; i+=2){
cnt[data[i] - 'a'].first++;
}
sort(cnt.begin(), cnt.end(), greater<p... | a.cc: In function 'void input()':
a.cc:17:14: error: reference to 'data' is ambiguous
17 | gets(data);
| ^~~~
In file included from /usr/include/c++/14/vector:69,
from a.cc:2:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constex... |
s118744152 | p01867 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,ans=0;string s;
cin>>n>>s;
int d[26]={};
int a[11]={};
for(int i=0;i<s.size();i++)d[s[i]-'a']++;
for(int i=0;i<26;i++){
if(d[i]){
ams++;
a[d[i]]++;
}
}
if(ans)ans--;
ans+=a[1]
for(int i=2;i<11;i++){
ans+=min(a[i]+4,a[i]*3);
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:11:1: error: 'ams' was not declared in this scope; did you mean 'ans'?
11 | ams++;
| ^~~
| ans
a.cc:16:10: error: expected ';' before 'for'
16 | ans+=a[1]
| ^
| ;
17 | for(int i=2;i<11;i++){
| ~~~
a.cc:17:13: error: 'i'... |
s304589675 | p01867 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,ans=0;string s;
cin>>n>>s;
int d[26]={};
int a[11]={};
for(int i=0;i<s.size();i++)d[s[i]-'a']++;
for(int i=0;i<26;i++){
if(d[i]){
ans++;
a[d[i]]++;
}
}
if(ans)ans--;
ans+=a[1]
for(int i=2;i<11;i++){
ans+=min(a[i]+4,a[i]*3);
}
cout<<ans<<endl... | a.cc: In function 'int main()':
a.cc:16:10: error: expected ';' before 'for'
16 | ans+=a[1]
| ^
| ;
17 | for(int i=2;i<11;i++){
| ~~~
a.cc:17:13: error: 'i' was not declared in this scope
17 | for(int i=2;i<11;i++){
| ^
|
s274901711 | p01868 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
#define INF 1000000000
int memo[50][860][860];
int N;
int sum = 0;
vector<int> t;
int dfs(int i, int x, int y){
if(i == N){
int z = sum - x - y;
return max({x,y,z});
}
if(memo[i][x][y]>=0) return memo[i][x][y];
i... | a.cc: In function 'int main()':
a.cc:28:9: error: 'memset' was not declared in this scope
28 | memset(memo,-1,sizeof(memo));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include ... |
s557669160 | p01868 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
#define INF 1000000000
int memo[50][860][860];
int N;
int sum = 0;
vector<int> t;
int dfs(int i, int x, int y){
if(i == N){
int z = sum - x - y;
return max({x,y,z});
}
if(memo[i][x][y]>=0) return memo[i][x][y];
i... | a.cc: In function 'int main()':
a.cc:28:9: error: 'memset' was not declared in this scope
28 | memset(memo,-1,sizeof(memo));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include ... |
s691306876 | p01868 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
int s=0;
int upper;
int N;
int T[51];
int dp[51][900][900];
int dfs(int idx,int a,int b) {
if(idx==N) {
int t=max({a,b,s-a-b});
return t;
}
if(dp[idx][a][b]!=-1) return dp[idx][a][b];
... | a.cc: In function 'int main()':
a.cc:25:5: error: 'memset' was not declared in this scope
25 | 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>
... |
s344994483 | p01868 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
int N, S, T[50]; bool dp[51][834][1251];
int main() {
????????scanf("%d", &N);
????????for(int i = 0; i < N; i++) scanf("%d", &T[i]), S += T[i];
????????dp[0][0][0] = true;
????????for(int i = 1; i <= N; i++) {
????????????????for(int j = 0; j <= S / 3; j++) ... | a.cc: In function 'int main()':
a.cc:6:1: error: expected primary-expression before '?' token
6 | ????????scanf("%d", &N);
| ^
a.cc:6:2: error: expected primary-expression before '?' token
6 | ????????scanf("%d", &N);
| ^
a.cc:6:3: error: expected primary-expression before '?' token
6 | ???????... |
s466160158 | p01869 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)
#define DEBUG(x) cout<<#x<<": "<<x... | a.cc:27:4: error: 'vl select' redeclared as different kind of entity
27 | vl select;
| ^~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
from /usr/include/stdlib.h:514,
from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-... |
s733251478 | p01869 | C++ | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int d[2]={2,8},ans=-1;
vector<ll> v;
void func(int x,ll k){
if(x) v.push_back(k);
if(x==18) return ;
for(int i=0;i<2;i++) func(x+1,k*10+d[i]);
}
void func2(int x,ll k,int sum){
if(k==1&&sum) ans=max(ans,sum);... | a.cc: In function 'void func2(int, ll, int)':
a.cc:18:9: error: 's' was not declared in this scope
18 | if(k%!s[x]) func2(x,k/s[x],sum+1);
| ^
|
s505388347 | p01870 | C++ | //?????????????????¢?????§???2??????????????????????????????????????????O(logN)
//LCA??§???2????????????????????????O(logN)
//2??????????????¨?????????????????¶????????????????????¢?????§?????????3??????????????§???3????????????????????°???????????????
//??§???N = 2?????¨????????????????????????????????????????????????... | a.cc:10:1: error: 'vector' does not name a type
10 | vector<int> et[100000], ec[100000];
| ^~~~~~
a.cc: In function 'int dfs(int, int, int, int)':
a.cc:24:25: error: 'et' was not declared in this scope
24 | for( i = 0; i < et[v].size(); i++ ){
| ^~
a.cc:28:18: error: 'e... |
s627893906 | p01870 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i... | a.cc: In function 'void solve(long long int, long long int)':
a.cc:80:16: error: template argument 1 is invalid
80 | vector<data>vec(4,data(0,0,-1));
| ^
a.cc:80:16: error: template argument 2 is invalid
a.cc:80:23: error: reference to 'data' is ambiguous
80 | vector<data>vec(4,data(0... |
s407834879 | p01870 | C++ | #include <utility>
#include <tuple>
#include <algorithm>
#include <type_traits>
#include <queue>
#include <functional>
#include <vector>
#include <string>
#include <stack>
#include <iostream>
namespace lc {
template <typename EdgeType>
class AdjacencyList {
public:
typedef std::vector<EdgeType> ListType;
private:
std... | a.cc:25:13: error: 'EdgeWithWeight' in namespace 'lc' does not name a template type
25 | typedef lc::EdgeWithWeight<int> Edge;
| ^~~~~~~~~~~~~~
a.cc:26:19: error: 'Edge' was not declared in this scope
26 | lc::AdjacencyList<Edge> graph;
| ^~~~
a.cc:26:23: error: template ... |
s941688946 | p01870 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i... | a.cc: In function 'void solve(long long int, long long int)':
a.cc:70:16: error: template argument 1 is invalid
70 | vector<data>vec(3,data(0,0,-1));
| ^
a.cc:70:16: error: template argument 2 is invalid
a.cc:70:23: error: reference to 'data' is ambiguous
70 | vector<data>vec(3,data(0... |
s314099850 | p01870 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl
using namespace std;
typedef long lon... | a.cc: In function 'void dfs(int, int)':
a.cc:39:10: error: 'z' was not declared in this scope
39 | }z
| ^
|
s627701889 | p01870 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl
using namespace std;
typedef long lon... | a.cc: In function 'void dfs(int, int)':
a.cc:39:10: error: 'z' was not declared in this scope
39 | }z
| ^
|
s206983877 | p01873 | C++ | #include <iostream>
#include <vector>
using namespace std;
bool check(int N, vector<int>& a, int t) {
for (int i = 0; i + t < N; i++)
if (a[i] != a[i + t])
return false;
return true;
}
int main() {
int N; cin >> N;
vector<int> a(N);
for (int i = 0; i < N; i++)
scanf("%d", &a[i]);
int mi = INT_MAX;
for (... | a.cc: In function 'int main()':
a.cc:17:18: error: 'INT_MAX' was not declared in this scope
17 | int mi = INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include <vector>
+++ |+#include <c... |
s276836070 | p01873 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
vector<int> divisors(int x) {
vector<int> ret;
int p = 1;
while((long long)p*p <= x) {
if(x % p == 0) {
ret.push_back(p);
ret.push_back(x/p);
}
p++;
}
... | a.cc: In function 'int main()':
a.cc:46:3: error: 'sort' was not declared in this scope; did you mean 'short'?
46 | sort(yakusu.begin(),yakusu.end());
| ^~~~
| short
|
s613399687 | p01874 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl
using namespace std;
typedef long lon... | a.cc: In function 'P projection(const L&, const P&)':
a.cc:45:18: error: no match for 'operator*' (operand types are 'long double' and 'std::complex<double>')
45 | return l[0] + t*(l[0]-l[1]);
| ~^~~~~~~~~~~~
| | |
| | std::complex<double>... |
s674289046 | p01874 | C++ | #include<stdio.h>
using namespace std;
typedef double R;
template <class T>
class _Point{
public:
T x;
T y;
_Point(){}
_Point(T _x, T _y) :x(_x), y(_y){}
_Point(const _Point & v) :x(v.x), y(v.y){}
const _Point operator + (const _Point & v)
{
return _Point(x + v.x, y + v.y);
}
const _Point operator - (cons... | a.cc: In member function 'R SegmentLine::distance(Point) const':
a.cc:70:33: error: 'DBL_EPSILON' was not declared in this scope
70 | if (dir.abs() < DBL_EPSILON * 16)
| ^~~~~~~~~~~
a.cc:90:32: error: 'sqrt' was not declared in this scope
90 | ... |
s272478028 | p01874 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
#define EPS (1e-8)
#define equals(a,b) (fabs((a)-(b))<EPS)
class Point{
public:
double x,y;
Point(double x=0,double y=0):x(x),y(y){}
Point operator + (Point p){return Point(x+p.x,y+p.y);}
Point operator - (Point p){return Point(x... | a.cc: In function 'int main()':
a.cc:31:15: error: unable to find string literal operator 'operator""a' with 'const char [7]', 'long unsigned int' arguments
31 | r(i,n)scanf("%lf%lf"a[i+1].x,a[i+1].y);
| ^~~~~~~~~
|
s731967545 | p01874 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-14;
/* ??????????????¬ */
#include <complex>
typedef complex<ld> Point;
const ld pi = acos(-1.0);
const ld dtop = pi / 180.;
const ld ptod = 1. / dto... | a.cc: In function 'int main()':
a.cc:228:42: error: 'diss' was not declared in this scope; did you mean 'dis'?
228 | ld dis = diss[j];
| ^~~~
| dis
|
s304542999 | p01875 | C++ | #include <bits/stdc++.h>
using namespace std;
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define _repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define _rep(i,n) _repl(i,0,n)
#define rep(...) GET_MACRO(__VA_ARGS__, _repl, _rep)(__VA_ARGS__)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all... | a.cc: In instantiation of 'void _dbg(std::string, H, T ...) [with H = std::vector<int>; T = {}; std::string = std::__cxx11::basic_string<char>]':
a.cc:71:5: required from here
13 | #define dbg(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:15:105: error: no match... |
s316506666 | p01876 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
// ?????¨??????????????°????§£????????????????????????
class BipartiteMatching{
private:
int V;
vector<vector<int> > G; // ??£??\?????????
vector<int> match; // ??????????????°?????????
vector<bool> used; // DFS??§?????¨???????????????... | a.cc: In member function 'void ConditionalMaxFlow::add_edge(int, int, int, int)':
a.cc:93:55: warning: narrowing conversion of '(&((ConditionalMaxFlow*)this)->ConditionalMaxFlow::G.std::vector<std::vector<ConditionalMaxFlow::edge> >::operator[](((std::vector<std::vector<ConditionalMaxFlow::edge> >::size_type)to)))->std... |
s902343503 | p01876 | C++ | #include<stdio.h>
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<math.h>
#include<algorithm>
using namespace std;
class MatrixIndex :public pair<int, int>
{
public:
MatrixIndex(int i, int j) :pair<int, int>(i, j){
}
};
class Matrix :public vector< vector... | a.cc:327: error: unterminated #if
327 | #if defined(_DEBUG)
a.cc: In function 'int main()':
a.cc:325:12: error: expected '}' at end of input
325 | int main(){
| ~^
|
s058032688 | p01876 | C++ | #include<stdio.h>
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<math.h>
#include<algorithm>
using namespace std;
class MatrixIndex :public pair<int, int>
{
public:
MatrixIndex(int i, int j) :pair<int, int>(i, j){
}
};
class Matrix :public vector< vector... | a.cc:336: error: unterminated #if
336 | #if defined(_DEBUG)
a.cc: In function 'int main()':
a.cc:334:12: error: expected '}' at end of input
334 | int main(){
| ~^
|
s877909500 | p01879 | C++ | #include <iostream>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<int, int>;
struct Node {
using NP = Node*;
ll sm, lz;
void init_node() {
sm = lz = 0;
}
void update() {
sm = l->sm + r->sm;
}
void push() {
if (lz) {
l->lzd... | a.cc: In function 'void init()':
a.cc:91:9: error: 'sort' was not declared in this scope; did you mean 'short'?
91 | sort(p[i], p[i]+BS, [&](const P &l, const P &r){
| ^~~~
| short
|
s830899490 | p01879 | C++ | #include <vector>
#include <cstdio>
using namespace std;
??
struct FenwickTree {
????????typedef int T;
????????vector<T> v;
????????void init(int n) { v.assign(n, 0); }
????????void add(int i, T x) {
????????????????for(; i < (int)v.size(); i |= i + 1) v[i] += x;
????????}
????????T sum(int i) const {?????? //[0, i)
?... | a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
a.cc:21:1: error: expected unqualified-id before '?' token
21 | ??
| ^
|
s047882085 | p01879 | C++ | #include <vector>
#include <cstdio>
using namespace std;
??
struct FenwickTree {
????????typedef int T;
????????vector<T> v;
????????void init(int n) { v.assign(n, 0); }
????????void add(int i, T x) {
????????????????for(; i < (int)v.size(); i |= i + 1) v[i] += x;
????????}
????????T sum(int i) const {?????? //[0, i)
?... | a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
a.cc:21:1: error: expected unqualified-id before '?' token
21 | ??
| ^
|
s240957814 | p01879 | C++ | #include <vector>
#include <cstdio>
using namespace std;
??
struct FenwickTree {
typedef int T;
vector<T> v;
void init(int n) { v.assign(n, 0); }
void add(int i, T x) {
for(; i < (int)v.size(); i |= i + 1) v[i] += x;
}
T sum(int i) const {?????? //[0, i)
T r = 0;
for(-- i; i >= 0; i = (i & (i + 1)) - 1) r +... | a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
a.cc:21:1: error: expected unqualified-id before '?' token
21 | ??
| ^
|
s898206381 | p01879 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl
using namespace std;
typedef long lon... | a.cc: In function 'int main()':
a.cc:41:21: error: no matching function for call to 'std::vector<std::pair<std::pair<int, int>, int> >::push_back(std::pair<std::pair<int, int>, std::pair<int, int> >)'
41 | v.pb(mp(mp(l / B, r), mp(l, i)));
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In f... |
s630027097 | p01880 | C | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
#include <queue>
#include <cmath>
#include <tr1/unordered_map>
#include <bits/stdc++.h>
using namespace std;
using namespace std::tr1;
#define N 1010
#define M 1000010
#define LL long long
#... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s612608206 | p01880 | C | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#define MAXN 1010
using namespace std;
bool text(long long x)
{
int a,b=-1;
while(x>0)
{
a=x%10;
if(b>=0 && a!=b-1)
return false;
b=a;
x/=10;
}
return true;
}
int a[MAXN];
int main()
{
int n;
long long ans=-1;
scanf("%d",&n)... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s980893809 | p01880 | C | #include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<bitset>
#include<vector>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<cmath>
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
const int maxn = 1005;
int a[maxn],n;
bool check(in... | main.c:1:9: fatal error: algorithm: No such file or directory
1 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s228905226 | p01880 | C | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;
char str[100];
bool legal(int x){
sprintf(str, "%d", x);
int L = strlen(str);
char b = str[0];
for(int i=1;i<L;i++) if(str[i]!=b+i) return false;
return true;
}
int a[1010];
int main(){
int n;
scanf("%d", &n);
for(... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s775410150 | p01880 | C | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
#include <cmath>
#include <map>
#include <vector>
#include <cctype>
#include <set>
#include "iostream"
using namespace std;
#define FOP freopen("input.txt","r",stdin)
#define Met(x,y) memset(x,y,sizeof x)
typedef long long ll;
const ll MAXN = 11... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s444545934 | p01880 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
vector<long long>num;
long long n,a[10000];
int main(){
for(int i=1;i<=9;i++){
for(int j=i;j<=9;j++){
string S="";
for(int k=i;k<=j;k++)S+=(char)('0'+k);
num.push_back(stoll(S));
}
}
cin>>n;for(int i=0;i<n;i++)... | a.cc: In function 'int main()':
a.cc:22:39: error: 'vec' was not declared in this scope
22 | for(int k=0;k<vec.size();k++){
| ^~~
a.cc:25:47: error: no matching function for call to 'max(int&, long long int&)'
25 | if(flag... |
s459100525 | p01880 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
vector<long long>num;
long long n,a[10000];
int main(){
for(int i=1;i<=9;i++){
for(int j=i;j<=9;j++){
string S="";
for(int k=i;k<=j;k++)S+=(char)('0'+k);
num.push_back(stoll(S));
}
}
cin>>n;for(int i=0;i<n;i++)... | a.cc: In function 'int main()':
a.cc:25:47: error: no matching function for call to 'max(int&, long long int&)'
25 | if(flag==true)maxn=max(maxn,B);
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/i... |
s847560700 | p01880 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
using namespace std;
int n;
int a[1005];
char s[1005];
bool judge(int x)
{
itoa(x,s,10);
//puts(s);
int l=strlen(s);
for(int i=1; i<l; i++)
{
if(s[i]!=s[i-1]+1)
return false;
}
return true;
}
int main()
{
//freopen("1.txt","r",stdi... | a.cc: In function 'bool judge(int)':
a.cc:13:9: error: 'itoa' was not declared in this scope
13 | itoa(x,s,10);
| ^~~~
|
s996696566 | p01880 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
using namespace std;
int n;
int a[1005];
char s[1005];
bool judge(int x)
{
itoa(x,s,10);
//puts(s);
int l=strlen(s);
for(int i=1; i<l; i++)
{
if(s[i]!=s[i-1]+1)
return false;
}
return true;
}
int main()
{
//freopen("1.txt","r",stdi... | a.cc: In function 'bool judge(int)':
a.cc:13:9: error: 'itoa' was not declared in this scope
13 | itoa(x,s,10);
| ^~~~
|
s480931175 | p01881 | C | #include <bits/stdc++.h>
using namespace std;
#define MP(x, y) make_pair((x), (y))
const int MAX_HW = 200 + 5;
const int INF = 0x3f3f3f3f;
const int dir[4][2] = {{-1,0},{1,0},{0,-1},{0,1}};
int H, W;
char s[MAX_HW][MAX_HW];
int sdd[MAX_HW][MAX_HW], pnd[MAX_HW][MAX_HW];
inline bool mvable(int x, int y){
return !(x... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s315507552 | p01881 | C++ | #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>
static const int MOD = 1000000007;
using ll = long long;
using u32 = uint32_t;
using namespace std;
template<class T> constexpr T INF = ::nu... | a.cc:14:13: error: 'uint32_t' does not name a type
14 | using u32 = uint32_t;
| ^~~~~~~~
a.cc:11:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
10 | #include <cmath>
+++ |+#include <cstdint>
11 |
a.cc: In function 'int main()':... |
s184893076 | p01881 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define SF scanf
#define PF printf
#define PB push_back
#define MP make_pair
#define mx 5000001
#define MOD 1000000007
#define INP freopen("in.txt", "r", stdin);
#define OUT freopen("out.txt", "w", stdout);
#define BOOST std::ios... | a.cc:76:31: error: stray '\26' in program
76 | level[x][y]=lg<U+0016>el[p1][p2]+1;
| ^~~~~~~~
a.cc: In function 'void bfs3(int, int)':
a.cc:76:29: error: 'lg' was not declared in this scope; did you mean 'log'?
76 | level[x][y]=lgel[p1][p2]+1;
... |
s932917761 | p01881 | C++ | //
// main.cpp
// ac
//
// Created by 胡天翼 on 2017/2/21.
// Copyright ? 2017年 胡天翼. All rights reserved.
//
#include <iostream>
#include <set>
#include <vector>
#include <queue>
#include <cmath>
#include <algorithm>
#include <map>
#define read freopen("in.txt","r",stdin)
#define maxlongint 2147483647
typedef long l... | a.cc: In function 'int main()':
a.cc:41:18: error: 'memset' was not declared in this scope
41 | #define f0(a) memset(a,0,sizeof(a))
| ^~~~~~
a.cc:119:5: note: in expansion of macro 'f0'
119 | f0(v);
| ^~
a.cc:16:1: note: 'memset' is defined in header '<cstring>'; this is pro... |
s849412706 | p01881 | C++ | #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define mk make_pair
using namespace std;
int dx[]={0,0,1,-1},dy[]={1,-1,0,0};
int main(){
int h,w,x,y,sol=0,pri=0;
cin>>h>>w;
bool b[h][w];
string s[h];
r(i,h)cin>>s[i];
r(i,h)r(j,w){if(s[i][j]=='%')x=j,y=i;
r(i,h)r(j,w)b[i][j]=0;
queue<pair<... | a.cc: In function 'int main()':
a.cc:32:2: error: expected '}' at end of input
32 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s503141556 | p01881 | C++ | #include <iostream>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <stack>
#include <cctype>
#include <queue>
#include <string>
#include <vector>
#include<functional>
#include <set>
#include <map>
#include <climits>
#define lson root<<1,l,mid
#... | a.cc: In function 'int main()':
a.cc:104:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
104 | gets(x[i]);
| ^~~~
| getw
|
s829188993 | p01881 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<stack>
#include<bitset>
#include<cstdlib>
#include<cmath>
#include<set>
#include<list>
#include<deque>
#include<queue>
using namespace std;
int n,H,W;
const int maxn = 1e3;
const int INF = 1e9;
int labyr... | a.cc:27:11: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
27 | } soldier[1e5],princess,escape;
| ^~~
a.cc:27:11: error: could not convert '1.0e+5' from 'double' to 'long unsigned int'
27 | } soldier[1e5],princess,escape;
| ^~~
| ... |
s083477138 | p01881 | C++ | #include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<map>
#include<queue>
#define set(x,y) memset(x,y,sizeof(x))
#define scan(x) scanf("%d",&x)
#define For(x,y,z) for(int x=y;x<=z;x++)
using namespace std;
const int MAXN = 210;
int maps[202][202];
int fx,fy;
int stx,sty;
... | a.cc:18:5: error: 'int index' redeclared as different kind of entity
18 | int index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:2:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const... |
s580870249 | p01882 | C++ | #include<iostream>
#include<cmath>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<map>
#include<set>
using namespace std;
struct atom{
int w,t;
};
int operator < (atom k1,atom k2){
return k1.w>k2.w||(k1.w==k2.w&&k1.t>k2.t);
}
set<atom>S;
map<string,int>M;
int n,m,len,t,w[110000],si;
string na[110000]... | a.cc: In function 'int main()':
a.cc:69:41: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
69 | scanf("%d",&n); S.insert((atom){1e9,1e9}); k=S.begin();
| ^~~
|
s648522420 | p01882 | C++ | #include <stdio.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <math.h>
#include <bitset>
using namespace std;
typedef pair<int,int> P;
typedef long long LL;
const int INF = ... | a.cc:43:9: error: 'int clock' redeclared as different kind of entity
43 | int pri,clock;
| ^~~~~
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++/14/bits/gthr.h:157... |
s306616545 | p01882 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<string, long long>> inp;
for (int i = 0; i < n; ++i) {
string s;
long long p;
cin >> s >> p;
inp.push_back(make_pair(s, p));
}
int m;
cin >> m;
for (int i = 0; i < m; +... | a.cc: In function 'int main()':
a.cc:42:5: error: 'BIT' was not declared in this scope
42 | BIT bit(n + m + 9);
| ^~~
a.cc:46:9: error: 'bit' was not declared in this scope
46 | bit.add(mp[inp[i].first], 1);
| ^~~
a.cc:49:19: error: 'bit' was not declared in this scope
49 | ... |
s223752235 | p01883 | C | #include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
long long a,temp;
scanf("%I64d",&a);
int num=1;
while(1){
temp=(num+1)*num/2;
if(temp>=a) break;
num++;
}
if(temp==a){
for(int i=1;i<=num;i++)
printf(")");
for(int i=1;i<=num;i++)
printf("("... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s358661450 | p01883 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <set>
#define pb push_back
#define ll long long int
#define ull unsigned long long int
#define gcd(a,b) __gcd(a,b)
#define ... | a.cc: In function 'int main()':
a.cc:48:23: error: no matching function for call to 'max(long long int, long long unsigned int)'
48 | if(c1!=0) c1 = max(0LL,((fi.length()-c1)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/... |
s303512700 | p01884 | C | #include<bits/stdc++.h>
using namespace std;
const int maxn = 1e6+10;
vector<int>g[maxn];
int depth[maxn];
long long cnt[maxn];
void dfs(int s)
{
for(int i=0;i<g[s].size();i++)
{
depth[g[s][i]] = depth[s]+1;
dfs(g[s][i]);
}
}
int main()
{
int n;
scanf("%d",&n);
int a,b;
for(int i=1;i<n;i++)
{
scanf("%d%d"... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s334151306 | p01884 | C | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<queue>
#include<stack>
#include<cmath>
#include<set>
#include<map>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define fi first
#define s... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s085919346 | p01884 | C++ | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <deque>
#include <queue>
#include <map>
#include <stack>
#include <vector>
using namespace std;
const int mod=1e9+7;
const int maxn=1e6+10;
map<__int64,__int64> mp;
vector<int> g[maxn];
__int64 d[maxn];
... | a.cc:18:5: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
18 | map<__int64,__int64> mp;
| ^~~~~~~
| __ynf64
a.cc:18:13: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
18 | map<__int64,__int64> mp;
| ^~~~~~~
| ... |
s671828679 | p01884 | C++ | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <deque>
#include <queue>
#include <map>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
const int maxn = 1e5+10;
const ll p = 9901;
int n,m,k;
ll has[maxn];
vector<int>edg[maxn];
ma... | a.cc: In function 'void dfs(int, int)':
a.cc:28:34: error: 'mod' was not declared in this scope; did you mean 'modf'?
28 | has[u]=(has[u]+has[v]*p)%mod;
| ^~~
| modf
|
s831910127 | p01884 | C++ | #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000001
using namespace std;
struct Hash{
H... | a.cc: In member function 'ull HashTree::calc_ans()':
a.cc:75:37: error: expression cannot be used as a function
75 | sum += (hash[i].num)(hash[i].num-1)/2;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
|
s911738746 | p01884 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef unsigned long long ull;
int n,a,c;
ull b=21387612863821
ull ans;
map<ull,ull>m;
vector<int>v[100009];
ull dfs(int x){
ull res=1;
r(i,v[x].size()) res*=dfs(v[x][i]);
res*=b;
//cout<<x<<' '<<m[res]<<endl;
ans+=m[res]++;
r... | a.cc:7:1: error: expected ',' or ';' before 'ull'
7 | ull ans;
| ^~~
a.cc: In function 'ull dfs(int)':
a.cc:15:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
15 | ans+=m[res]++;
| ^~~
| abs
a.cc: In function 'int main()':
a.cc:25:9: error: 'ans' was not declared in th... |
s339307224 | p01885 | C | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <utility>
#include <functional>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <bitset>
using namesp... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s051908408 | p01885 | C | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <utility>
#include <functional>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <bitset>
using namesp... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s613754000 | p01885 | C | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <vector>
#include <string>
using namespace std;
typedef long long LL;
typedef vector <int> VI;
typedef pair <int,int> PII;
#define FOR(i,x,y) for(int i = (int)(x)... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s589912938 | p01885 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <stack>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#includ... | a.cc:192:18: error: expected nested-name-specifier before 'T'
192 | typename T& operator[](int n) {
| ^
a.cc:192:18: error: expected ';' at end of member declaration
192 | typename T& operator[](int n) {
| ^
| ;
a.cc:192:18: error... |
s327939560 | p01885 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <stack>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#includ... | a.cc: In constructor 'BIT<T>::BIT(int)':
a.cc:200:21: error: class 'BIT<T>' does not have any field named 'obj'
200 | BIT(int n) :obj(n + 1, 0) {}
| ^~~
a.cc: In member function 'void BIT<T>::add(int, T)':
a.cc:203:29: error: 'n' was not declared in this scope
203 | ... |
s572104130 | p01885 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <stack>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#includ... | a.cc: In member function 'void BIT<T>::add(int, T)':
a.cc:203:29: error: 'n' was not declared in this scope
203 | while (i <= n) {
| ^
a.cc: In constructor 'rangeadd<T>::rangeadd(int)':
a.cc:221:38: error: expected '{' at end of input
221 | rangeadd(int n) :... |
s341656307 | p01885 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <stack>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#includ... | a.cc: In member function 'void BIT<T>::add(int, T)':
a.cc:202:29: error: 'n' was not declared in this scope
202 | while (i <= n) {
| ^
|
s720156921 | p01885 | C++ | #include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long LL;
typedef pair<LL, LL> P;
const int N = 1e5 + 5;
LL n, m;
LL c[N], day[N];
P drinks[N];
bool check(int mid) {
LL sum = 0, tmp = drinks[mid].first - drinks[mid].second;
for (int i = 1; i < mid; ... | a.cc: In function 'int main()':
a.cc:41:5: error: continue statement not within a loop
41 | continue;
| ^~~~~~~~
|
s480621013 | p01887 | C++ | #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <cassert>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(... | a.cc: In function 'int solve(VI)':
a.cc:32:11: error: request for member 'clear' in 'v', which is of non-class type 'int [10100]'
32 | v.clear(); c.clear();
| ^~~~~
a.cc:32:22: error: request for member 'clear' in 'c', which is of non-class type 'int [10100]'
32 | v.clear(); c.clea... |
s334782331 | p01887 | C++ | #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <cassert>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(... | a.cc: In function 'int solve(VI)':
a.cc:32:11: error: request for member 'clear' in 'v', which is of non-class type 'int [10100]'
32 | v.clear(); c.clear();
| ^~~~~
a.cc:32:22: error: request for member 'clear' in 'c', which is of non-class type 'int [10100]'
32 | v.clear(); c.clea... |
s397420549 | p01887 | C++ | using namespace std;
const int N = 200005;
int w,h,k,n;
map <pair<int,int>,int> M,Map;
pair<int,int> a[N];
int main(){
scanf("%d%d%d",&w,&h,&k);
scanf("%d",&n);
Map.clear();
M.clear();
for (int i = 1; i <= n; i++){
scanf("%d%d",&a[i].first,&a[i].second);
Map[a[i]] = 1;
}
k -= (w + 1) / 2;
int s = 0;
sort(a... | a.cc:4:1: error: 'map' does not name a type
4 | map <pair<int,int>,int> M,Map;
| ^~~
a.cc:5:1: error: 'pair' does not name a type
5 | pair<int,int> a[N];
| ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf' was not declared in this scope
7 | scanf("%d%d%d",&w,&h,&k);
| ... |
s482507146 | p01888 | Java | to QA team as a release candidate. However, they reported that some tests failed! Because we were too lazy to set up a continuous integration system, we have no idea when our software corrupted. We only know that the software passed all the test at the past revision | Main.java:1: error: class, interface, enum, or record expected
to QA team as a release candidate. However, they reported that some tests failed! Because we were too lazy to set up a continuous integration system, we have no idea when our software corrupted. We only know that the software passed all the test at the pas... |
s576534695 | p01888 | Java | We are developing the world's coolest AI robot product. After the long struggle, we finally managed to send our product at revision | Main.java:1: error: class, interface, enum, or record expected
We are developing the world's coolest AI robot product. After the long struggle, we finally managed to send our product at revision
^
Main.java:1: error: unclosed character literal
We are developing the world's coolest AI robot product. After the long stru... |
s560516750 | p01889 | C | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pii pair<int, int>
#define MP make_pair
#define ls i << 1
#define rs ls | 1
#define md (ll + rr >> 1)
#define lson ll, md, ls
#define rson md + 1, rr, rs
#define mod 1000000007
#define inf 0x3f3f3f3f
#define Pi acos(-1.0)
#define pb push_back
... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s414012178 | p01890 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 8;
const int INF = 1e9 + 7;
struct edge
{
int u, v, w, nt;
}eg[N << 2];
int lt[N], sum;
int n;
int gas[N];
int vis[N];
int a[N], b[N];
int tot, root;
int size[N], sizeMax[N];
struct node
{
int x, len;
};
vector <node> f, g;
int p[N], num;
int ans, fla... | a.cc: In function 'void getRoot(int, int)':
a.cc:82:9: error: reference to 'size' is ambiguous
82 | size[u] = 1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+... |
s746690182 | p01890 | C++ | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
#define int long long
template< class T >
struct BinaryIndexedTree
{
vector< T > data;
BinaryIndexedTree() {}
void init(int sz)
{
data.assign(++sz, 0);
}
T sum(int k)
{
T ret = 0;
for(++k; k < data.size(); k += k & -k... | a.cc: In function 'std::pair<long long int, long long int> search_centroid(long long int, long long int, long long int)':
a.cc:56:24: error: 'INF' was not declared in this scope
56 | pair< int, int > ret(INF, -1);
| ^~~
a.cc: In function 'void beet(long long int)':
a.cc:107:25: error: ... |
s651120669 | p01892 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep1(i,n) for(int i=1;i<=n;++i)
int main(void){
ll A,B,N,res=LLONG_MAX;
cin>>A>>B>>N;
rep1(i,N)rep1(j,N){
if(B*j%i==0){
ll x=abs(B*j/i - A);
res = min(res,x);
}
}
cout<<res<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'll' was not declared in this scope
7 | ll A,B,N,res=LLONG_MAX;
| ^~
a.cc:8:14: error: 'A' was not declared in this scope
8 | cin>>A>>B>>N;
| ^
a.cc:8:17: error: 'B' was not declared in this scope
8 | c... |
s452503190 | p01892 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep1(i,n) for(int i=1;i<=n;++i)
int main(void){
ll A,B,N,res=LLONG_MAX;
cin>>A>>B>>N;
rep1(i,N)rep1(j,N){
if(B*j%i==0){
ll x=abs(B*j/i - A);
res = min(res,x);
}
}
cout<<res<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'll' was not declared in this scope
7 | ll A,B,N,res=LLONG_MAX;
| ^~
a.cc:8:14: error: 'A' was not declared in this scope
8 | cin>>A>>B>>N;
| ^
a.cc:8:17: error: 'B' was not declared in this scope
8 | c... |
s126796718 | p01895 | C++ | #include <bits/stdc++.h>
using namespace std;
#define for_(i,a,b) for(int i=(a);i<(b);++i)
int N, M, k[111];
Vec< set< int > > adj;
int main() {
cin >> N >> M;
memset(k, -1, sizeof(k));
adj.assign(N, set< int >());
int cnt = 0;
while (cnt < 3 * N) {
bool end = true;
for_(v,0,N) {
if ((int)adj[v].size()... | a.cc:7:1: error: 'Vec' does not name a type
7 | Vec< set< int > > adj;
| ^~~
a.cc: In function 'int main()':
a.cc:12:9: error: 'adj' was not declared in this scope
12 | adj.assign(N, set< int >());
| ^~~
|
s728327103 | p01895 | C++ | #include <bits/stdc++.h>
using namespace std;
#define for_(i,a,b) for(int i=(a);i<(b);++i)
int N, M, k[111];
Vec< set< int > > adj;
int main() {
cin >> N >> M;
memset(k, -1, sizeof(k));
adj.assign(N, set< int >());
int cnt = 0;
while (cnt < 3 * N) {
bool end = true;
for_(v,0,N) {
if ((int)adj[v].size()... | a.cc:7:1: error: 'Vec' does not name a type
7 | Vec< set< int > > adj;
| ^~~
a.cc: In function 'int main()':
a.cc:12:9: error: 'adj' was not declared in this scope
12 | adj.assign(N, set< int >());
| ^~~
|
s697809365 | p01895 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m,i,j,k,c=0,d=0,ans=0;
cin>>n>>m;
int s=0,t=2*n+1;
for(i=0;i<n;i++){
cout << "lst " << i << endl;
cin >> k;
ans+=k*(k-1)/2;
add_edge(s,i+1,k);
add_edge(n+i+1,t,k);
for(j=0;j<k;j++) cin >> c;
}
cout << "ans "<< ans << en... | a.cc: In function 'int main()':
a.cc:12:5: error: 'add_edge' was not declared in this scope
12 | add_edge(s,i+1,k);
| ^~~~~~~~
|
s769051175 | p01895 | 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 'int main()':
a.cc:26:15: error: expected primary-expression at end of input
26 | ans += k *
| ^
a.cc:26:15: error: expected '}' at end of input
a.cc:22:11: note: to match this '{'
22 | rep(i,n){
| ^
a.cc:26:15: error: expected '}' at end of input
26 ... |
s389593676 | p01896 | C++ | #include <iostream>
#include <vector>
using namespace std;
using ll = long long;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10LL * TEN(n-1); }
using P = pair<int, int>;
bool ok(vector<P> v) {
sort(begin(v), end(v));
vector<P> st;
for (auto p: v) {
while (st.size() && st.back().second < p.firs... | a.cc: In function 'bool ok(std::vector<std::pair<int, int> >)':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(begin(v), end(v));
| ^~~~
| short
|
s417884056 | p01896 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <pair>
using namespace std;
using ll = long long;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10LL * TEN(n-1); }
using P = pair<int, int>;
bool ok(vector<P> v) {
sort(begin(v), end(v));
vector<P> st;
for (auto p: v) {
while (s... | a.cc:4:10: fatal error: pair: No such file or directory
4 | #include <pair>
| ^~~~~~
compilation terminated.
|
s797001150 | p01898 | C++ | f | a.cc:1:1: error: 'f' does not name a type
1 | f
| ^
|
s838817433 | p01898 | C++ | #include <bits/stdc++>
#define N 100
#define M 100
#define inrange(i,j) ((i)>=0&&(i)<m&&(j)>=0&&(j)<n)
using namespace std;
int main(void){
int m,n,c;
cin>>m>>n;
bool m[M][N];
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
m[i][j]=true;
}
}
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
cin>>c;
if(c=='x... | a.cc:1:10: fatal error: bits/stdc++: No such file or directory
1 | #include <bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s432874796 | p01898 | C++ | #include <iostream>
#define N 100
#define M 100
#define inrange(i,j) ((i)>=0&&(i)<m&&(j)>=0&&(j)<n)
using namespace std;
int main(void){
int m,n,c;
cin>>m>>n;
bool m[M][N];
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
m[i][j]=true;
}
}
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
cin>>c;
if(c=='x'){... | a.cc: In function 'int main()':
a.cc:10:14: error: conflicting declaration 'bool m [100][100]'
10 | bool m[M][N];
| ^
a.cc:8:13: note: previous declaration as 'int m'
8 | int m,n,c;
| ^
a.cc:13:26: error: invalid types 'int[int]' for array subscript
13 | ... |
s087822393 | p01898 | C++ | #include <iostream>
#include <fstream>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <numeric>
#include <functional>
#include <string>
#include <vector>
#include <bitset>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
using namespace std;
typed... | a.cc: In function 'void init()':
a.cc:74:3: error: 'M' was not declared in this scope
74 | M['A']="000000";
| ^
a.cc: In function 'int main()':
a.cc:141:14: error: 'w' was not declared in this scope
141 | while(cin>>w>>h>>p,w){
| ^
a.cc:141:17: error: 'h' was not declared in this sco... |
s896881405 | p01899 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <set>
#include <queue>
#define rep(i,a) for(int i = 0 ; i < a ; i ++)
using namespace std;
int main(void){
int n,ret = 0,in,d;
cin>>n>>d;
rep(i,n){
cin>>in;
ret += (in>d?in-d:0);
}
cout<<(ret?ret:"kusoge")<<endl;
} | a.cc: In function 'int main()':
a.cc:18:13: error: operands to '?:' have different types 'int' and 'const char*'
18 | cout<<(ret?ret:"kusoge")<<endl;
| ~~~^~~~~~~~~~~~~
|
s772436376 | p01899 | C++ | #include<iostream>
using namespace std;
int main(){
int N,d,p[1000],count=0;
cin >> N >> d;
for(int i=0;i<1000;i++){
cout << p[i];
if(p[i] > d){
count = count + (p[i]-d)
}
}
if(count == 0){
cout << "kusoge\n";
}
else{
cout << count << "\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:49: error: expected ';' before '}' token
9 | count = count + (p[i]-d)
| ^
| ;
10 | }
| ~ ... |
s669303819 | p01899 | C++ | #include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
int main(){
int n,a;
cin>>n>>a;
int memo;
int ans=0;
lp(i,n){
cin>>memo;
else if(memo>a) ans+=memo-a;
}
if(ans<=0) cout<<"kusoge"<<endl;
else cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:5: error: 'else' without a previous 'if'
12 | else if(memo>a) ans+=memo-a;
| ^~~~
|
s016782879 | p01900 | C++ | #include<iostream
using namespace std;
int main(){
int n,a[3]={0,0,0},z;
cin>>n;
while(n--){cin>>z;a[z%3]++;}
if(a[1]+a[2]==0)cout<<"0"<<endl;
else{
int s=a[0]+min(a[1],a[2]);
if(a[1]!=a[2])s++;
cout<<s<<endl;
}
return 0;
} | a.cc:1:18: error: missing terminating > character
1 | #include<iostream
| ^
|
s965769677 | p01900 | C++ | #include<iostream>
using namespace std;
int main()
{
int n, a = 0, b = 0, c = 0, result = 0;
cin >> n;
for (int i = 0; i < n; i++)
{
int tmp;
cin >> tmp;
if(tmp % 3 == 0)
a++;
if(tmp % 3 == 1)
b++;
if(tmp % 3 == 2)
c++;
}
if(b == 0 && c == 0)
{
cout << 1 << endl;
exit(0);
... | a.cc: In function 'int main()':
a.cc:39:25: error: expected '}' at end of input
39 | cout << result << endl;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s336197592 | p01900 | C++ | #include<c:\bits\stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[500000]={}, a0=0, a1=0, a2=0, count=1, sum = 0,b=0;
for(int i=0;i<n;i++){
cin >> a[i];
if(a[i]%3 == 0) a0++;
else if(a[i]%3 == 1) a1++;
else if(a[i]%3 == 2) a2++;
}
while(1){
// cout<<a0<<" "<<a1<<" "<<a2<<" "<<coun... | a.cc:1:9: fatal error: c:\bits\stdc++.h: No such file or directory
1 | #include<c:\bits\stdc++.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
|
s308014282 | p01900 | C++ | #include<c:\bits\stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[500000]={}, a0=0, a1=0, a2=0, count=0, sum = 0,b=0;
for(int i=0;i<n;i++){
cin >> a[i];
if(a[i]%3 == 0) a0++;
else if(a[i]%3 == 1) a1++;
else if(a[i]%3 == 2) a2++;
}
while(1){
// cout<<endl<<a0<<" "<<a1<<" "<<a2<<" "<... | a.cc:1:9: fatal error: c:\bits\stdc++.h: No such file or directory
1 | #include<c:\bits\stdc++.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.