submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s228551326 | p01901 | C++ |
int T;
int N;
int s[100001];
int t[100001];
int hikage(int start, int time);
int main(int argc, char* argv[])
{
char temp[1000];
fgets(temp, sizeof(temp), stdin);
sscanf(temp, "%d", &T);
fgets(temp, sizeof(temp), stdin);
sscanf(temp, "%d", &N);
int pos = 1;
int n = N;
s[0] = 0;
t[0] = 0;
while (n--) {
... | a.cc: In function 'int main(int, char**)':
a.cc:13:35: error: 'stdin' was not declared in this scope
13 | fgets(temp, sizeof(temp), stdin);
| ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#... |
s517622273 | p01901 | C++ | /*#include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
int main(){
int T, N, temp[10][100100], temp2 = 0, ans, i, j = 0, tempT;
cin>>T>>N;
for(i = 0; i < N; i++){
cin>>temp[0][i]>>temp[1][i];
}
tempT = T;
for(i = 0; i < N; i++){
tempT += temp[0][j];
if(i){ans -... | /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
|
s174370179 | p01902 | C++ | #include<iostream>
#include<queue>
#include<vector>
#include<cstdio>
using namespace std;
struct card { int turn; vector<int>a, b, c; };
queue<pair<card, long double>>Q;
int n; card F;
void Swap(int p, int r, card &G) {
vector<int>J;
if (p == 0) { for (int i = 0; i < G.a.size(); i++) { if (G.a[i] != r)J.push_back(G.a... | a.cc: In function 'void Swap(int, int, card&)':
a.cc:17:9: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(G.a.begin(), G.a.end());
| ^~~~
| short
a.cc: In function 'int main()':
a.cc:33:9: error: 'sort' was not declared in this scope; did you mean 's... |
s522895068 | p01902 | C++ | #include<iostream>
#include<queue>
#include<vector>
#include<cstdio>
using namespace std;
struct card { int turn; vector<int>a, b, c; };
queue<pair<card, long double>>Q;
int n; card F;
void Swap(int p, int r, card &G) {
vector<int>J;
if (p == 0) { for (int i = 0; i < G.a.size(); i++) { if (G.a[i] != r)J.push_back(G.a... | a.cc: In function 'void Swap(int, int, card&)':
a.cc:17:9: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(G.a.begin(), G.a.end());
| ^~~~
| short
a.cc: In function 'int main()':
a.cc:33:9: error: 'sort' was not declared in this scope; did you mean 's... |
s113871769 | p01902 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld =float128;
const ld eps = 1e-9;
//namespace cent {
//
// struct Edge {
// int src;
// int dst;
// long long int cost;
// };
// using Graph = vector<vector<Edge>>;
//
// class Centroi... | a.cc:6:11: error: 'float128' does not name a type; did you mean '_Float128'?
6 | using ld =float128;
| ^~~~~~~~
| _Float128
a.cc:7:7: error: 'ld' does not name a type
7 | const ld eps = 1e-9;
| ^~
a.cc:387:1: error: 'ld' does not name a type
387 | ld memo[101][101][... |
s146061487 | p01902 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld =float128;
const ld eps = 1e-9;
//namespace cent {
//
// struct Edge {
// int src;
// int dst;
// long long int cost;
// };
// using Graph = vector<vector<Edge>>;
//
// class Centroi... | a.cc:6:11: error: 'float128' does not name a type; did you mean '_Float128'?
6 | using ld =float128;
| ^~~~~~~~
| _Float128
a.cc:7:7: error: 'ld' does not name a type
7 | const ld eps = 1e-9;
| ^~
a.cc:387:1: error: 'ld' does not name a type
387 | ld memo[101][101][... |
s075981312 | p01902 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = __float128;
const ld eps = 1e-9;
//namespace cent {
//
// struct Edge {
// int src;
// int dst;
// long long int cost;
// };
// using Graph = vector<vector<Edge>>;
//
// class Cent... | a.cc: In function 'int main()':
a.cc:551:38: error: ambiguous overload for 'operator<<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'ld' {aka '__float128'})
551 | cout<<setprecision(10)<<fixed<<ans<<endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~... |
s208588662 | p01903 | C++ | #include <queue>
#include <vector>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
struct edge { int to, cap, rev; };
const int INF = (1 << 30);
int K, N, M, V, E, level[109], iter[109]; vector<vector<edge> > G; vector<pair<int, int> > G2;
void add_edge(int v1, int v2, int cap) {
G[v1]... | a.cc: In function 'void bfs(int)':
a.cc:15:9: error: 'memset' was not declared in this scope
15 | memset(level, -1, sizeof(level));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <algorithm>
+++ |+#i... |
s242153830 | p01903 | C++ | #include<bits/stdc++.h>
using namespace std;
#define MAX_V 105
#define ll int
const ll INF = 1 << 28;
struct edge{
ll to,cap,rev;
edge(ll to ,ll cap,ll rev):to(to),cap(cap),rev(rev){}
};
vector<edge> G[MAX_V];
vector<edge> G2[MAX_V];
bool used[MAX_V];
void add_edge(ll from,ll to,ll cap){
G[from].push_back(edge(to... | a.cc: In function 'int main()':
a.cc:81:11: error: expected ')' before '{' token
81 | if(G{i][j].cap!=0) continue;
| ~ ^
| )
a.cc:81:13: error: expected primary-expression before ']' token
81 | if(G{i][j].cap!=0) continue;
| ^
|
s513877689 | p01905 | C | #include <stdio.h>
int main(void){
scanf("%d %d",&N,&M);
printf("%d",N-M);
return 0;
}
| main.c: In function 'main':
main.c:5:20: error: 'N' undeclared (first use in this function)
5 | scanf("%d %d",&N,&M);
| ^
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:23: error: 'M' undeclared (first use in this function)
... |
s331387083 | p01905 | C++ | n, m = map(int, raw_input().split())
print n - m - 1 | a.cc:1:1: error: 'n' does not name a type
1 | n, m = map(int, raw_input().split())
| ^
|
s571231359 | p01905 | C++ | #include<iostream>
using namespace std;
main(){
int a b;
cin>>a>>b;
cout<<a-b-1<<endl;
} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:9: error: expected initializer before 'b'
4 | int a b;
| ^
a.cc:5:8: error: 'a' was not declared in this scope
5 | cin>>a>>b;
| ... |
s552218940 | p01905 | C++ | asdfg | a.cc:1:1: error: 'asdfg' does not name a type
1 | asdfg
| ^~~~~
|
s709833092 | p01905 | C++ | #include <stdio.h>
int N,M,i,K;
int fun(K)
{
if((K)==0){return 1;}
else
{
return fun((K)/2)+K;
}
}
int main()
{
scanf("%d %d",&N,&M);
int a[M];
for (i=0; i<=M-1; i++)
{
scanf("%d",&a[i]);
}
K=N-M;
printf("%d\n",fun(K)-K);
} | a.cc:6:3: error: expected ',' or ';' before '{' token
6 | {
| ^
a.cc: In function 'int main()':
a.cc:28:20: error: 'fun' cannot be used as a function
28 | printf("%d\n",fun(K)-K);
| ~~~^~~
|
s027170511 | p01905 | C++ | #include<stdio.h>
int main(){
int answer,N,M[m],a;
scanf("%d %d",&N,&m);
for(int i=0;i<N;i++){
M[i]=i;
}
for(int i=0;i<m;i++){
scanf("%d",a);
M[a]=1000;
}
int L=0;
while(N>1){
N/=2;
L+=N;
}
for(int i=0;i<N;i=i+2){
if(M[i]!=i||M[i+1]!=(i+1)){
L=L-1;
}
}
printf("%d\n",L);
return 0;
} | a.cc: In function 'int main()':
a.cc:3:24: error: 'm' was not declared in this scope
3 | int answer,N,M[m],a;
| ^
a.cc:6:17: error: 'M' was not declared in this scope
6 | M[i]=i;
| ^
a.cc:10:17: error: 'M' was not declared in this scope
... |
s971563104 | p01905 | C++ | #include <iostream>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
for(int i = 0; i < m; i++){
int a;
cin >> a;
}
cout << (n-m) -1; << endl;
} | a.cc: In function 'int main()':
a.cc:12:27: error: expected primary-expression before '<<' token
12 | cout << (n-m) -1; << endl;
| ^~
|
s821918537 | p01905 | C++ | print()
| a.cc:1:8: error: expected constructor, destructor, or type conversion at end of input
1 | print()
| ^
|
s267507164 | p01905 | C++ | #include<iostream>
using namespace std;
int main () {
int n, m;
cin >> n >> m;
vector<int> a(m);
for(int i = 0; i < m; i++) cin >> a[i];
n -= m;
long long ans = 0;
while(n > 1) {
ans += n / 2;
n = n / 2;
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
8 | vector<int> a(m);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 |
a.... |
s960963860 | p01905 | C++ | using System;
public class Hello
{
public static void Main()
{
string[] line = Console.ReadLine().Trim().Split(' ');
var n = int.Parse(line[0]);
var m = int.Parse(line[1]);
for (int i = 0; i < m; i++) Console.ReadLine();
Console.WriteLine(n - m - 1);
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Hello
| ^~~~~~
|
s903928760 | p01905 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
int a,b;
cin>>a>>b;
a-=b;
int c;
for(int i=0;i<m;i++)cin>>c;
cout<<a/2<<endl;
}
| a.cc: In function 'int main()':
a.cc:9:17: error: 'm' was not declared in this scope
9 | for(int i=0;i<m;i++)cin>>c;
| ^
|
s287038520 | p01906 | C++ | #include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
int main(){
int n,m;
scanf("%d %d",&n,&m);
int a[n],i,j=0;
for(i=0;i<n;i++){
scanf("%d",a+i);
}
int max=INT_MIN,min=INT_MAX;
int total;
i=0;
while(1){
total=0;
for(... | a.cc: In function 'int main()':
a.cc:24:28: error: expected ';' before '}' token
24 | i++
| ^
| ;
25 | }
| ~
|
s804974856 | p01906 | C++ | #include <iostream>
#include <queue>
#include <algorithm>
using namespace std;
int gcd(int x, int y){
if(x%y) return gcd(y, x%y);
return y;
}
int lcm(int x, int y){
return x*y/gcd(x, y);
}
int N, M, A[1024];
int main(){
memset(A, 0, sizeof(A));
queue<int> q;
cin >> N >> M;
for(int i=0;i<N;i++){
i... | a.cc: In function 'int main()':
a.cc:19:3: error: 'memset' was not declared in this scope
19 | memset(A, 0, sizeof(A));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <cstring>
4 |... |
s027658341 | p01906 | C++ | #include <iostream>
using namespace std;
int Euclid(int x,int y){
if(!(x%y))
return y;
return Euclid(y,x/y);
}
int main(int argc, char *argv[])
{
int x,y,w[1000];
cin >> x >> y;
for(int i=0; i<x; i++)
cin >> w[i];
while(num%y)
num += x;
int sum = 0;
int max=0;
int min=0;
for(int i=... | a.cc: In function 'int main(int, char**)':
a.cc:18:9: error: 'num' was not declared in this scope; did you mean 'enum'?
18 | while(num%y)
| ^~~
| enum
a.cc:25:18: error: 'num' was not declared in this scope; did you mean 'sum'?
25 | for(int i=0; i<num; i++){
| ... |
s515620205 | p01907 | C++ | #include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a; i<n; i++)
using namespace std;
typedef pair<int, int> pii;
typedef vector< vector<pii> > Graph;
struct Edge {
int from, to, cost;
Edge(int a, int b, int c) : from(a), to(b), cost(c) {};
};
int depth[100010];
void getDepth(Graph &G, int point) {
for(... | a.cc: In function 'int main()':
a.cc:52:27: error: 'b' was not declared in this scope
52 | int d = max(x, y);b
| ^
|
s394481570 | p01907 | C++ | #include "bits/stdc++.h"
using namespace std;
vector<pair<int,double> > G[100000];
double p;
int n;
int deep=0;
double ans=0;
double ans2;
vector<int> used(100000,0);
vector<int> used1(100000,0);
void dfs(int x){
tt++;
deep++;
for(int i=0;i<G[x].size();i++){
if(used[G[x][i].first]==0){
ans+=pow(p,dee... | a.cc: In function 'void dfs(int)':
a.cc:15:3: error: 'tt' was not declared in this scope; did you mean 'tm'?
15 | tt++;
| ^~
| tm
a.cc: In function 'void dfs2(int)':
a.cc:29:12: error: no match for 'operator[]' (operand types are 'std::vector<int>' and '__gnu_cxx::__alloc_traits<std::allocator<std:... |
s709397400 | p01907 | C++ | #include "bits/stdc++.h"
using namespace std;
vector<pair<int,double> > G[100000];
double p;
int n;
int deep=0;
double ans=0;
double ans2;
vector<int> used(100000,0);
vector<int> used1(100000,0);
void dfs(int x){
tt++;
deep++;
for(int i=0;i<G[x].size();i++){
if(used[G[x][i].first]==0){
ans+=pow(p,dee... | a.cc: In function 'void dfs(int)':
a.cc:15:3: error: 'tt' was not declared in this scope; did you mean 'tm'?
15 | tt++;
| ^~
| tm
|
s645025725 | p01908 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define
int N;
string S[111111];
int en(string s){
int ret=0;
rep(i,s.size())ret=ret*26+s[i]-'a';
int t=26;
for(int i=1;i<s.size();i++){
ret+=t;
t*=26;
}
return ret;
}... | a.cc:7:9: error: no macro name given in #define directive
7 | #define
| ^
|
s234263557 | p01909 | C++ |
#include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
//... | a.cc:169:6: error: stray '#' in program
169 | Case # Verdict CPU Time Memory In Out Case Name
| ^
a.cc:170:7: error: stray '#' in program
170 | Case #1: : Accepted 00.00 sec 3244 KB
| ^
a.cc:171:7: error: stray '#' in program
171 | Case #2: : Accepted 00.00 sec 3236 KB
| ^
a... |
s464980803 | p01910 | C++ | #include <bits/stdc++.h>
using namespace std;
const bool debug = true;
#define dbg(...) if(debug) printf(__VA_ARGS__)
#define print(var) if (debug) cout << #var << " = " << var << endl
namespace {
using ll = long long;
int N, M, R, Q;
vector<tuple<int, int, int>> rules;
void input() {
cin >>... | a.cc: In function 'void {anonymous}::solve()':
a.cc:76:26: error: no matching function for call to 'max(int&, {anonymous}::ll)'
76 | add = max(add, z - cost);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x8... |
s688429360 | p01911 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef int _loop_int;
#define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i... | a.cc:23:14: error: expected primary-expression before '=' token
23 | #define SIZE = 425252;
| ^
a.cc:27:9: note: in expansion of macro 'SIZE'
27 | pii rev[SIZE];
| ^~~~
a.cc:23:22: error: expected ']' before ';' token
23 | #define SIZE = 425252;
| ^
a... |
s184788639 | p01911 | C++ | #include <iostream>
#include <queue>
#include <unordered_map>
#include <algorithm>
#include <functional>
#define int long long
using namespace std;
typedef pair<int, int> P;
int n, m, s, g;
int u[200000], v[200000], t[200000], c[200000];
unordered_map<P, vector<P>> et;
unordered_map<P, vector<int>> ec;
vector<int> sta... | a.cc:12:29: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<long long int, long long int>; _Tp = std::vector<std::pair<long long int, long long int> >; _Hash = std::hash<std::pair<long long int, long long int> >; _Pred = std::equal_to<std::pair... |
s039929017 | p01911 | C++ | #include <iostream>
#include <queue>
#include <unordered_map>
#include <algorithm>
#include <functional>
#define int long long
using namespace std;
typedef pair<int, int> P;
int n, m, s, g;
int u[200000], v[200000], t[200000], c[200000];
unordered_map<P, vector<P>> et;
unordered_map<P, vector<int>> ec;
vector<int> sta... | a.cc:12:29: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<long long int, long long int>; _Tp = std::vector<std::pair<long long int, long long int> >; _Hash = std::hash<std::pair<long long int, long long int> >; _Pred = std::equal_to<std::pair... |
s961994081 | p01911 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
ll n,m,s,g,u[200000],v[200000],t[200000],c[200000],ans[200001],used[100001];
vector<ll> b[100001];
ll solve(){
priority_queue< P, vector<P> , greater<P> > Q;
memset(ans,-1,sizeof(ans));
for(int i=0;i<m;i++)
if(u[i]==s)Q.... | /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
|
s069142176 | p01911 | C++ | #include<bits/stdc++.h>
using namespace std;
int N,M;
int s,g;
struct state{
int t,c,to;
bool operator<(const state& st) const {
return t < st.t;
}
};
vector<state> U[200015];
vector<int> V[200015];
typedef pair<int,int> P;
map<P,int> ids;
struct edge {
int to,c;
edge(){
}
edge(int to,int c):to(to... | a.cc: In function 'int main()':
a.cc:83:14: error: 'sv' was not declared in this scope; did you mean 'su'?
83 | while( sv > su.t) {
| ^~
| su
a.cc:88:24: error: 'sv' was not declared in this scope; did you mean 'su'?
88 | int nu = ids[P(i,sv)];
| ... |
s078988923 | p01912 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long int64;
const int64 INF = 1LL << 58;
struct StronglyConnectedComponents
{
vector< vector< int > > gg, rg;
vector< pair< int, int > > edges;
vector< int > comp, order, used;
StronglyConnectedComponents(size_t v) : gg(v), rg(v), comp(v, -1), used(v... | a.cc:63:18: error: 'int link [500][500]' redeclared as different kind of entity
63 | int link[500][500];
| ^
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/c++/14/csignal:42,
... |
s495252936 | p01913 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
#define rep(i, N) for (int i = 0; i < N; i++)
#define pb push_back
typedef long long ll;
typedef pair<int, int> i_i;
const int INF = INT_MAX / 2;
struct union_find {
vector<int> v;
union_find(int n) : v(n, -1) {}
int find(int x) { return ... | a.cc:11:17: error: 'INT_MAX' was not declared in this scope
11 | const int INF = INT_MAX / 2;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include <queue>
+++ |+#include <climits>
4 | using namespace... |
s957733058 | p01915 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
constexpr int MAX_V = 1000
constexpr int INF = (1 << 29);
struct edge {
int to, cap, cost, rev;
edge(int to, int cap, int cost, int rev) :
to{to}, cap{cap}, cost{cost}, rev{rev} {}
};
int V;
vector<edge> G[MAX_V];
int di... | a.cc:8:1: error: expected ',' or ';' before 'constexpr'
8 | constexpr int INF = (1 << 29);
| ^~~~~~~~~
a.cc: In function 'int min_cost_flow(int, int, int)':
a.cc:30:30: error: 'INF' was not declared in this scope
30 | fill(dist, dist + V, INF);
| ^~~
a.cc: In func... |
s130137604 | p01915 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
constexpr int MAX_V = 1000
constexpr int INF = (1 << 29);
struct edge {
int to, cap, cost, rev;
edge(int to, int cap, int cost, int rev) :
to{to}, cap{cap}, cost{cost}, rev{rev} {}
};
int V;
vector<edge> G[MAX_V];
int di... | a.cc:8:1: error: expected ',' or ';' before 'constexpr'
8 | constexpr int INF = (1 << 29);
| ^~~~~~~~~
a.cc: In function 'int min_cost_flow(int, int, int)':
a.cc:30:30: error: 'INF' was not declared in this scope
30 | fill(dist, dist + V, INF);
| ^~~
a.cc: In func... |
s412714940 | p01916 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vec... | a.cc:35:13: error: stray '\23' in program
35 | int d[3][N];<U+0013>
| ^~~~~~~~
a.cc:36:5: error: stray '\23' in program
36 | int <U+0013><U+0013>point[3][N],<U+0013>r[N];
| ^~~~~~~~
a.cc:36:6: error: stray '\23' in program
36 | int <U+0013><U+0013>point[3][N],<U+0013>r[N];
| ... |
s984043884 | p01916 | C++ | using System;
class Program
{
static int[] separateChar;
static void Setting(string separateString)
{
const char baseKey = 'a';
for(int i = 0; i < separateString.Length;i++)
{
separateChar[(int)(separateString[i] - baseKey)]++;
}
}
static int Count()
{
int count = 0;
for(int i = 0; i < 26;i++)
{
if(separat... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:6:11: error: expected unqualified-id before '[' token
6 | static int[] separateChar;
| ^
a.cc:7:21: error: 'string' has not been declared
7 | static void Setting(string separateString)... |
s232331162 | p01916 | C++ | let list_of_str s = let rec f i = if i >= String.length s then [] else s.[i] :: f (i+1) in f 0
let () =
let s = Scanf.scanf "%s" list_of_str in
List.init 26 (fun i ->
let c = char_of_int (i+97) in
List.filter ((=) c) s |> List.length |> (fun x -> x mod 2))
|> List.fold_left (+) 0
|> (fun x -> Printf.pri... | a.cc:1:1: error: 'let' does not name a type
1 | let list_of_str s = let rec f i = if i >= String.length s then [] else s.[i] :: f (i+1) in f 0
| ^~~
|
s703657391 | p01917 | C++ | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
//#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f... | a.cc: In function 'int main()':
a.cc:104:13: error: '_DEBUG' was not declared in this scope
104 | if (_DEBUG) {
| ^~~~~~
|
s002257861 | p01919 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
public class D {
class Edge {
final int to, cost;
Edge(int to, int cost) {
this.to = to;
... | Main.java:9: error: class D is public, should be declared in a file named D.java
public class D {
^
1 error
|
s607912114 | p01919 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
public class Main {
class Edge {
final int to, cost;
Edge(int to, int cost) {
this.to = to... | Main.java:109: error: <identifier> expected
private static class FastScanner {javascript:void(0)
^
Main.java:109: error: <identifier> expected
private static class FastScanner {javascript:void(0)
^
Main.java:109: error:... |
s903312447 | p01919 | C++ | #include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
??
typedef pair<int,int> pii;
typedef pair<pii,long long> piii;
vector<vector<long long>>d(501,vector<long long>(51,INF));
signed main(){
????????int n,m;?? cin>>n>>m;
????????vecto... | a.cc:16:15: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs]
16 | ????????????????--a,--b;
a.cc:7:1: error: expected unqualified-id before '?' token
7 | ??
| ^
a.cc:9:14: error: 'pii' was not declared in this scope
9 | typedef pair<pii,long long> piii;
| ^~~
a.cc... |
s422763325 | p01919 | C++ |
Login
Register/Setting
Japanese English
For beginners HOME-
Notes
#2517448 Solution for 2819: Country in Distortion by yebityon
Source Code Status Test Cases Policy: public Reviewed: 28
00.13 sec 3776 KB 57 lines 1943 bytes 2017-09-01 14:24
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18... | a.cc:8:10: error: "Solution" is not a valid filename
8 | #2517448 Solution for 2819: Country in Distortion by yebityon
| ^~~~~~~~
a.cc:10:57: error: invalid digit "9" in octal constant
10 | 00.13 sec 3776 KB 57 lines 1943 bytes 2017-09-01 14:24
| ... |
s093838924 | p01919 | C++ | #include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
typedef pair<int,int> pii;
typedef pair<pii,pii> piii;
//vector<vector<long long> >d(501,vector<long long>(51,INF));
long long d[501][2][51];
signed main(){
rep(i,501)rep(j,2)rep... | a.cc: In function 'int main()':
a.cc:2:13: error: expected ',' or ';' before 'long'
2 | #define int long long
| ^~~~
a.cc:30:9: note: in expansion of macro 'int'
30 | int _v=(v*a+b)%c;
| ^~~
a.cc:33:57: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::pair... |
s739089416 | p01919 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n;i++)
#define int long long
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
typedef pair<int,int> pii;
typedef pair<pii,pii> piii;
//vector<vector<long long> >d(501,vector<long long>(51,INF));
long long d[501][2][51];
signed main(){
rep(i,501)rep(j,2)rep... | a.cc: In function 'int main()':
a.cc:3:13: error: expected ',' or ';' before 'long'
3 | #define int long long
| ^~~~
a.cc:30:9: note: in expansion of macro 'int'
30 | int _v=(v*a+b)%c;
| ^~~
a.cc:33:57: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::pair... |
s829215964 | p01919 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n;i++)
#define int long long
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
typedef pair<int,int> pii;
typedef pair<pii,pii> piii;
//vector<vector<long long> >d(501,vector<long long>(51,INF));
long long d[501][2][51];
signed main(){
rep(i,501)rep(j,2)rep... | a.cc: In function 'int main()':
a.cc:3:13: error: expected ',' or ';' before 'long'
3 | #define int long long
| ^~~~
a.cc:30:9: note: in expansion of macro 'int'
30 | int _v=(v*a+b)%c;
| ^~~
a.cc:33:57: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::pair... |
s528082307 | p01919 | C++ | #include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
typedef pair<int,int> pii;
typedef pair<pii,pii> piii;
//vector<vector<long long> >d(501,vector<long long>(51,INF));
int d[501][2][51];
signed main(){
rep(i,501)rep(j,2)rep(k,51)... | a.cc: In function 'int main()':
a.cc:2:13: error: expected ',' or ';' before 'long'
2 | #define int long long
| ^~~~
a.cc:30:9: note: in expansion of macro 'int'
30 | int _v=(v*a+b)%c;
| ^~~
a.cc:33:57: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::pair... |
s238143033 | p01919 | C++ | #include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
typedef pair<int,int> pii;
typedef pair<pii,pii> piii;
//vector<vector<long long> >d(501,vector<long long>(51,INF));
int d[501][2][51];
signed main(){
rep(i,501)rep(j,2)rep(k,51)... | a.cc: In function 'int main()':
a.cc:30:9: error: expected ',' or ';' before 'long'
30 | long long _v=(v*a+b)%c;
| ^~~~
a.cc:33:63: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::pair<long long int, long long int> > >, std::vector<std::pair<long long int, long long int> > >::... |
s055220177 | p01919 | C++ | #include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
typedef pair<int,int> pii;
typedef pair<pii,pii> piii;
//vector<vector<long long> >d(501,vector<long long>(51,INF));
int d[501][2][51];
signed main(){
rep(i,501)rep(j,2)rep(k,51)... | a.cc: In function 'int main()':
a.cc:33:57: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::pair<long long int, long long int> > >, std::vector<std::pair<long long int, long long int> > >::value_type' {aka 'class std::vector<std::pair<long long int, long long int> >'} has no member named 'first'
33... |
s864405392 | p01919 | C++ | #include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
typedef pair<int,int> pii;
typedef pair<pii,pii> piii;
//vector<vector<long long> >d(501,vector<long long>(51,INF));
int d[501][2][51];
signed main(){
rep(i,501)rep(j,2)rep(k,51)... | a.cc: In function 'int main()':
a.cc:37:59: error: no matching function for call to 'std::pair<long long int, long long int>::pair(long long int [51], long long int&)'
37 | que.push(piii(pii(d[next.first][_v],next.first),{nt,_v}));
| ^
In fi... |
s098458723 | p01919 | C++ | #include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
#define MAX 1e9
int INF=MAX*MAX;
??
typedef pair<int,int> pii;
typedef pair<pii,long long> piii;
vector<vector<long long>>d(501,vector<long long>(51,INF));
signed main(){
????????int n,m;?? cin>>n>>m;
????????vecto... | a.cc:16:15: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs]
16 | ????????????????--a,--b;
a.cc:7:1: error: expected unqualified-id before '?' token
7 | ??
| ^
a.cc:9:14: error: 'pii' was not declared in this scope
9 | typedef pair<pii,long long> piii;
| ^~~
a.cc... |
s259985207 | p01920 | C++ | define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#include <random>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define rep2(i,a,b) for(int i=(a);i<(b);++i)
#define rrep(i,n) for(int i=(n)-1;i>=0;--i)
#define rrep2(i,a,b) for(int i=(a)-1;i>=b;--i)
#define range(i,a,b,c... | a.cc:1:1: error: 'define' does not name a type
1 | define _CRT_SECURE_NO_WARNINGS
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
fro... |
s930242421 | p01920 | C++ | define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#include <random>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define rep2(i,a,b) for(int i=(a);i<(b);++i)
#define rrep(i,n) for(int i=(n)-1;i>=0;--i)
#define rrep2(i,a,b) for(int i=(a)-1;i>=b;--i)
#define range(i,a,b,c... | a.cc:1:1: error: 'define' does not name a type
1 | define _CRT_SECURE_NO_WARNINGS
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
fro... |
s436515462 | p01921 | C++ | #include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < int(n); ++i)
using namespace std;
typedef vector<int> VI;
typedef long long ll;
const ll mod = 1e9 + 7;
const int N = 300001;
ll var[N];
void init_hash(void) {
rep(i, N) {
var[i] = rand() % mod;
}
}
ll get_hash(in... | a.cc: In function 'int main()':
a.cc:130:3: error: 'sort' was not declared in this scope; did you mean 'short'?
130 | sort(hash2.begin(), hash2.end());
| ^~~~
| short
|
s545120963 | p01921 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <sstream>
#include <iostream>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long l... | a.cc: In function 'void solve()':
a.cc:123:32: error: return-statement with a value, in function returning 'void' [-fpermissive]
123 | if(n[0]==300000)return 0;
| ^
|
s469092917 | p01921 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <sstream>
#include <iostream>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long l... | a.cc: In function 'int calc(int, int)':
a.cc:48:9: error: reference to 'end' is ambiguous
48 | end=buf;
| ^~~
In file included from /usr/include/c++/14/vector:69,
from a.cc:3:
/usr/include/c++/14/bits/range_access.h:116:37: note: candidates are: 'template<class _Tp> const _Tp* ... |
s332564409 | p01921 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <sstream>
#include <iostream>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long l... | a.cc: In function 'int calc(int, int, int)':
a.cc:35:9: error: 'calced' was not declared in this scope; did you mean 'calc'?
35 | calced[v]=true;
| ^~~~~~
| calc
a.cc:41:37: error: too few arguments to function 'int calc(int, int, int)'
41 | int val=calc... |
s797420655 | p01921 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef vector< vector<int> > Graph;
typedef long long int ll;
??
Graph ginput(int n, int m) {
Graph G(n);
for(int i=0; i<m; i++) {
int s, t; cin >> s >> t;
s--; t--;
G[s].push_back(t);
G[t].push_back(s);
}
return G;
}
??
vect... | a.cc:5:1: error: expected unqualified-id before '?' token
5 | ??
| ^
a.cc:16:1: error: expected unqualified-id before '?' token
16 | ??
| ^
a.cc:45:1: error: expected unqualified-id before '?' token
45 | ??
| ^
a.cc:56:1: error: expected unqualified-id before '?' token
56 | ??
| ^
a... |
s368903708 | p01921 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef vector< vector<int> > Graph;
typedef long long int ll;
??
Graph ginput(int n, int m) {
Graph G(n);
for(int i=0; i<m; i++) {
int s, t; cin >> s >> t;
s--; t--;
G[s].push_back(t);
G[t].push_back(s);
}
return G;
}
??
vect... | a.cc:5:1: error: expected unqualified-id before '?' token
5 | ??
| ^
a.cc:16:1: error: expected unqualified-id before '?' token
16 | ??
| ^
a.cc:45:1: error: expected unqualified-id before '?' token
45 | ??
| ^
a.cc:56:1: error: expected unqualified-id before '?' token
56 | ??
| ^
a... |
s891746986 | p01921 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef vector< vector<int> > Graph;
typedef long long int ll;
??
Graph ginput(int n, int m) {
Graph G(n);
for(int i=0; i<m; i++) {
int s, t; cin >> s >> t;
s--; t--;
G[s].push_back(t);
G[t].push_back(s);
}
return G;
}
??
vect... | a.cc:5:1: error: expected unqualified-id before '?' token
5 | ??
| ^
a.cc:16:1: error: expected unqualified-id before '?' token
16 | ??
| ^
a.cc:45:1: error: expected unqualified-id before '?' token
45 | ??
| ^
a.cc:56:1: error: expected unqualified-id before '?' token
56 | ??
| ^
a... |
s236918718 | p01921 | C++ | #include <bits/stdc++.h>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int n[2],m[2];
vector<int> G[2][400001];
int dist[400001];
int dist2[400001];
bool used[400001];
vector<int> root[2];
vector<int> vs;
map<string,int> mp;
vector<int> vp;
int cnt=1;
char buf[3145140];
... | a.cc: In function 'int calc(int, int, int)':
a.cc:34:9: error: reference to 'end' is ambiguous
34 | end=buf;
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/valarray:1265:5: note: candidates are: 'template<cla... |
s387956144 | p01921 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <sstream>
#include <iostream>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long l... | a.cc: In function 'int calc2(Graph&, int, int)':
a.cc:77:9: error: reference to 'end' is ambiguous
77 | end=buf;
| ^~~
In file included from /usr/include/c++/14/vector:69,
from a.cc:3:
/usr/include/c++/14/bits/range_access.h:116:37: note: candidates are: 'template<class _Tp> co... |
s219468674 | p01921 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector< vector<int> > Graph;
int n[2],m[2];
vector<int> G[400001];
vector<Graph> tree;
Graph g2;
int dist[400001];
int dist2[400001];
int num[400001];
map<string,int> mp;
vector<int> vp;
int cnt=1;
void Forest_to_Trees... | a.cc: In function 'int main()':
a.cc:144:29: error: return-statement with no value, in function returning 'int' [-fpermissive]
144 | if(root[1].size()>2)return;
| ^~~~~~
|
s726185417 | p01923 | C | #include <stdio.h>
#include <memory.h>
int main(void){
int n,m,p[100],d,v,i,sum;
whlie(1){
sum=0;
scanf("%d %d",&n,&m);
if(!n) break;
memset(p,0,sizeof(p));
for(i=0;i<n;i++){
scanf("%d %d",&d,&v);
if(p[d-1]<v){
p[d-1]=v;
}
}
for(i=0;i<m;i++)
sum+=p[i];
printf("%d\n",sum);
}
return 0;... | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'whlie' [-Wimplicit-function-declaration]
5 | whlie(1){
| ^~~~~
main.c:5:17: error: expected ';' before '{' token
5 | whlie(1){
| ^
| ;
|
s884412354 | p01923 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_fast32_... | a.cc: In function 'int main()':
a.cc:53:38: error: 'd' was not declared in this scope
53 | sort(all(pro[d]));
| ^
a.cc:8:16: note: in definition of macro 'all'
8 | #define all(x) x.begin(),x.end()
| ^
|
s725468459 | p01923 | C++ | #include<bits/stdc++.h>
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
vector<vector<int>>a(m,vector<int>());
REP(i,n)
{
int d,v;
cin>>d>>v;
if(v>a.at(d-1).at(0))
{
a.at... | a.cc: In function 'int main()':
a.cc:17:23: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'push_front'
17 | a.at(d-1).push_front(v);
| ^~~~~~~~~~
|
s936068502 | p01923 | C++ | #include<bits/stdc++.h>
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
vector<vector<int>>a(m,vector<int>());
REP(i,n)
{
int d,v;
cin>>d>>v;
if(v>a.at(d-1).at(0))
{
a.at... | a.cc: In function 'int main()':
a.cc:17:23: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'push_front'
17 | a.at(d-1).push_front(v);
| ^~~~~~~~~~
|
s923949994 | p01923 | 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
| |
s623337446 | p01923 | 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
| |
s787914570 | p01923 | C++ | #include <iostream>
using namespace std;
int s[101];
int main(void){
int n,m;
int a,b;
cin>n>>m;
for(int i=0;i<n;i++){
cin>>a>>b;
s[a]=s[a]<b?b:s[a];
}
for(int i=1;i<=m;i++) cout<<s[i]<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:8: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
8 | cin>n>>m;
| ~~~^~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:8:8: note: candidate: 'o... |
s424210460 | p01924 | C++ | #include <iostream>
using namespace std;
int main(){
int t,d,l;
int check = 0;
int num = 0;
while(cin >> t >> d >> l){
if(t == 0 && d == 0 && l == 0){ break; }
for(int i = 0; i< t; i++){
cin >> x;
if(i != t-1){
if(x >= l){ check = d; }
if(check > 0){
... | a.cc: In function 'int main()':
a.cc:12:16: error: 'x' was not declared in this scope
12 | cin >> x;
| ^
|
s102314685 | p01924 | C++ |
#include <stdio.h> int main(){ int T,D,L; for(;~scanf("%d%d%d",&T,&D,&L)&&T&&D&&L;){ int r=0; for(int i=0,x,y=0;i<T;i++){ if(--y>=0)r++; scanf("%d",&x); if(x>=L)y=D; } printf("%d\n",r); } }
| a.cc:3:20: warning: extra tokens at end of #include directive
3 | #include <stdio.h> int main(){ int T,D,L; for(;~scanf("%d%d%d",&T,&D,&L)&&T&&D&&L;){ int r=0; for(int i=0,x,y=0;i<T;i++){ if(--y>=0)r++; scanf("%d",&x); if(x>=L)y=D; } printf("%d\n",r); } }
| ^~~
/usr/bin/ld: /usr/lib/gcc/x86... |
s007184266 | p01925 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(obj) obj.begin(), obj.end()
#define fcout cout << setprecision(10)
const int iINF = 1e9;
const long long llINF = 1e18;
const int MOD = 1e9 + 7;
using namespace std;
template <typename T>
void debug(vector<T> &vec) {
for (auto x :... | a.cc: In function 'void solve(int, int)':
a.cc:51:14: error: expected ';' before 'if'
51 | j if (k == 1) mins[c - 1].first += S;
| ^~~
| ;
|
s137523180 | p01925 | C++ | #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main() { int n, m; cin >> n >> m; int s, k, c; while(n != 0 && m != 0){ vector<int> mx(n, 0), mn(n, 0); for(int i = 0; i < m; i++){ cin >> s >> k; for(in... | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main() { int n, m; cin >> n >> m; int s, k, c; while(n != 0 && m != 0){ vector<int>... |
s420854610 | p01925 | C++ | #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main() { int n, m; cin >> n >> m; int s, k, c; while(n != 0 && m != 0){ vector<int> mx(n, 0), mn(n, 0); for(int i = 0; i < m; i++){ cin >> s >> k; for(in... | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main() { int n, m; cin >> n >> m; int s, k, c; while(n != 0 && m != 0){ vector<int>... |
s334577934 | p01925 | C++ | #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main() { int n, m; cin >> n >> m; int s, k, c; while(n != 0 && m != 0){ vector<int> mx(n, 0), mn(n, 0); for(int i = 0; i < m; i++){ cin >> s >> k; for(in... | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main() { int n, m; cin >> n >> m; int s, k, c; while(n != 0 && m != 0){ vector<int>... |
s381107415 | p01925 | C++ | #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main() { int n, m; cin >> n >> m; int s, k, c; while(n != 0 && m != 0){ vector<int> mx(n, 0), mn(n, 0); for(int i = 0; i < m; i++){ cin >> s >> k; for(in... | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main() { int n, m; cin >> n >> m; int s, k, c; while(n != 0 && m != 0){ vector<int>... |
s082741199 | p01925 | C++ | #include <bits/stdc++.h>
using namespace std;
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
typedef long long LL;
int main(){
int n,m;
while(1){
cin >> n >> m;
if(n==0) return 0;
vector<int> ma(n,0),mi(n,0);
int s,k;
int c;
for(int i=0;i<m;i++){
cin >> s >> k... | a.cc: In function 'int main()':
a.cc:47:28: error: 'a' was not declared in this scope
47 | secondmii=firstmii;a
| ^
|
s379805298 | p01926 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int n, m;
int s[100010];
int le[1000010], ri[1000010];
int lef, righ;
int ok, ng;
bool hantei(int x)
{
int tmp=1;
rep(i, m-2)
{
int fue=0;
if(ri[tmp]<tmp+x) fue=x-(ri[tmp]-tmp);
if(le[tmp... | a.cc:67:33: error: extended character “ is not valid in an identifier
67 | if(hantei(lef)) cout << “-1” << endl;
| ^
a.cc:67:35: error: extended character ” is not valid in an identifier
67 | if(hantei(lef)) cout << “-1” << endl;
| ... |
s553714965 | p01926 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
const ll mod = ll(1e9) + 7;
const int INF = int(1e9);
int N, M;
bool check(int X, vector<int> &S)
{
int L... | a.cc: In function 'bool check(int, std::vector<int>&)':
a.cc:34:18: error: overloaded function with no contextual type information
34 | L += max
| ^~~
|
s624482420 | p01926 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
const ll mod = ll(1e9) + 7;
const int INF = int(1e9);
int N, M;
bool check(int X, vector<int> &S)
{
int L... | a.cc: In function 'bool check(int, std::vector<int>&)':
a.cc:34:18: error: overloaded function with no contextual type information
34 | L += max
| ^~~
|
s723931007 | p01926 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
const ll mod = ll(1e9) + 7;
const int INF = int(1e9);
int N, M;
bool check(int X, vector<int> &S)
{
int L... | a.cc: In function 'int main()':
a.cc:66:29: error: 'L' was not declared in this scope
66 | if (left_ok != 0 && L + left_ok > S[0])
| ^
|
s786123823 | p01926 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = (int)(s); i < (int)(n); i++)
const ll mod = ll(1e9) + 7;
const int INF = int(1e9);
int N, M;
bool check(int X, vector<int> &S)
{
int L... | a.cc: In function 'int main()':
a.cc:66:13: error: 'L' was not declared in this scope
66 | if (L + left_ok > S[0])
| ^
|
s290569969 | p01926 | C++ | #include "../../bits/stdc++.h"
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (b) - 1;i >= (a);i--)
#define REP(i,n) FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))
using namespace std;
typedef pair< int ,int > P;
int N,M;
int s[100005];
bool input(){
cin>>N>>M;
s[0] = 0;
... | a.cc:1:10: fatal error: ../../bits/stdc++.h: No such file or directory
1 | #include "../../bits/stdc++.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s212470977 | p01926 | C++ | #include "../../bits/stdc++.h"
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (b) - 1;i >= (a);i--)
#define REP(i,n) FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))
using namespace std;
typedef pair< int ,int > P;
#include "../../libraries/binary_search.cpp"
int N,M;
int s[100005];
b... | a.cc:1:10: fatal error: ../../bits/stdc++.h: No such file or directory
1 | #include "../../bits/stdc++.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s936521871 | p01926 | C++ | #include <iostream>
#include <algorithm>
#include <stdlib.h>
using namespace std;
int N, M;
int s[100005];
bool check(int x)
{
if(x < 0) return true;
if(s[0] >= x + 1) return true;
int cnt = 0, lv = 1;
while(1){
cnt++;
if(lv + x > s[N-1]) break;
int tmp = 1;
int *p = upper_bound(s, s+N, lv);
if(p != ... | a.cc: In function 'bool check(int)':
a.cc:23:21: error: 'flag' was not declared in this scope
23 | if(!flag) return true;
| ^~~~
|
s464040518 | p01926 | C++ |
#include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <set> #include <map> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 1000000007 #define EPS... | a.cc:3:20: warning: extra tokens at end of #include directive
3 | #include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <set> #include <map> typedef long long int ll; typedef unsigned long long in... |
s178108297 | p01926 | C++ |
#include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <set> #include <map> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 1000000007 #define EPS... | a.cc:3:20: warning: extra tokens at end of #include directive
3 | #include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <set> #include <map> typedef long long int ll; typedef unsigned long long in... |
s577488070 | p01926 | C++ | #include <iostream>
using namespace std;
int s[100000];
bool p(int X, int N, int M){
bool clear = false;
int i = 0;
int L = 1;
int cnt = 1;
// 初手で最初の敵が倒せなきゃクリアできない
// 逆に,初手で最初の敵が倒せさえすれば地道にレベルアップして倒せる
if(s[0] >= L + X){
return false;
}else{
while(!clear && cnt < M){
// まず,ラスボスが倒せるんだったらつべこべ... | a.cc: In function 'int main()':
a.cc:59:41: error: expected ';' before 'int'
59 | cout << "p(3): " << p(3,N,M) << endl
| ^
| ;
60 | int Xmax = -1;
| ~~~
|
s226541449 | p01927 | Java | import java.awt.geom.Point2D;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Supplier;
public class Main {
final static int INF = 1 << 28;
final static long LNF = 1L << 60;
final stati... | Main.java:249: error: cannot find symbol
Pair<Long, Long> gcd_ex(long m, long n) {
^
symbol: class Pair
location: class Main
Main.java:251: error: cannot find symbol
return new Pair<>(mat[0][0], mat[0][1]);
^
symbol: class Pair
location: class Main
2 errors
|
s080614783 | p01927 | C++ | #include <iostream>
#include <complex>
#include <cstdio>
#include <utility>
#include <vector>
#include <queue>
#define X real()
#define Y imag()
#define EPS (1e-10)
#define INF (1e9)
using namespace std;
typedef complex<double> P;
typedef pair<P,P> L;
typedef pair<P,double> C;
typedef vector<P> Poly;
typedef vector<int... | a.cc: In function 'Poly convex_hull(Poly)':
a.cc:67:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
67 | sort(v.begin(), v.end(), cmp_y);
| ^~~~
| sqrt
|
s733815483 | p01928 | C++ | include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using vi = vector<i64>;
using vvi = vector<vi>;
// 二部グラフの最大重みマッチング
class Hungarian {
int n, p, q;
vvi mat;
vi fx, fy, x, y;
const i64 INF = 1e9;
public:
Hungarian(const vvi& mat) : mat(mat) {
n = mat.size();
fx.assig... | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc:3:13: error: 'int64_t' does not name a type
3 | using i64 = int64_t;
| ^~~~~~~
a.cc:1:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
... |
s750078751 | p01931 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pairInt;
#define FOR(i, n) for (int i = 0; i < int(n); i++)
#define FOR1(i, m, n) for (int i = int(m); i < int(n); i++)
#define MAX(a, b) ((a) >= (b) ? (a) : (b))
#define MIN(a, b) ((a) <= (b) ? (... | a.cc:12:26: error: expected ',' or '...' before 'argv'
12 | int main(int argc, char *argv[argc])
| ^~~~
a.cc:12:5: warning: second argument of 'int main(int, char*)' should be 'char **' [-Wmain]
12 | int main(int argc, char *argv[argc])
| ^~~~
|
s707372488 | p01932 | C++ | #include<iostream>
#include<vector>
#include<cmath>
using namespace std;
#define repeat(i,n) for(int i=0;i<(n);i++)
int main(){
int n;
int d;
int cur_h=1,cur_t=0;
int ans=0;
cin>>n>>d;
int t[n+1],f[n+1];
int onboard[100000],cur_d=-1;
for(int i=0; i<n; i++){
cin>>t[i]>>f[i];
}
for(int i=0; i<n;... | a.cc:55:5: error: redefinition of 'int main()'
55 | int main(){
| ^~~~
a.cc:8:5: note: 'int main()' previously defined here
8 | int main(){
| ^~~~
|
s794645743 | p01932 | C++ | #include<iostream>
#include<vector>
using namespace std;
#define int long long
#define repeat(i,n) for(int i=0;i<(n);i++)
int abs(int x){
return max(x, -x);
}
signed main(){
int n, d; cin>> n>> d;
vector<int> t(n), f(n);
repeat(i, n) cin>> t[i]>> f[i];
int sm=0;
int ele=0;
int tm=0;
int dd=0;
for... | a.cc: In function 'int main()':
a.cc:23:14: error: call of overloaded 'abs(long long int)' is ambiguous
23 | if(tm+abs(ele-f[i])>t[i]){
| ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
fro... |
s459491122 | p01933 | C++ | x#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
#define int long long
signed main(){
int n,k;
typedef pair<int,int> pii;
cin>>n>>k;
vector<bool>flag(n+1,true);
vector<bool>IsPrint(n+1,true);
vector<pii>mp(n+1);
int ans=0;
rep(i,n){
int temp; c... | a.cc:1:2: error: stray '#' in program
1 | x#include<bits/stdc++.h>
| ^
a.cc:1:1: error: 'x' does not name a type
1 | x#include<bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:7:13: error: 'pair' does not name a type
7 | typedef pair<int,int> pii;
| ^~~~
a.cc:8:5: e... |
s144370933 | p01934 | C++ | #include <bits/stdc++.h>
#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)
#define INF (1LL << 40)
using namespace std;
typedef long long ll;
ll N, M, S, T, D[100000], A, B;
vector<ll> E[100000];
int main(void) {
cin >> N >> M >> S >> T; S--; T--;
REP(i, 0, N) cin >> D[i];
REP(i, 0, M) {
cin >> A... | a.cc: In function 'int main()':
a.cc:20:18: error: 'state' was not declared in this scope; did you mean '_xstate'?
20 | priority_queue<state> q;
| ^~~~~
| _xstate
a.cc:20:23: error: template argument 1 is invalid
20 | priority_queue<state> q;
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.