submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s591834803 | p00992 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
#include<functional>
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(c.begin(),c.end()),c.end())
#define pb push_back
using namespace std;
typedef long long int ll;
int main(){
int n;
while(cin>>n){
vector<ll> x(n)... | a.cc: In function 'int main()':
a.cc:25:33: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
25 | ans+=max(0,x[i]-ms);
| ~~~^~~~~~~~~~~
In file included from /usr/include/... |
s143159070 | p00992 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int n,i,j;
cin >> n;
vector<int> v(n);
for(i=0; i<n; i++){
cin >> v[i];
}
sort(v.rbegin(),v.rend());
long long r = 1;
for(i=0;i<n&&(j=a[i]-i/4)>0;i++)r+=j;
cout << r << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:19: error: 'a' was not declared in this scope
15 | for(i=0;i<n&&(j=a[i]-i/4)>0;i++)r+=j;
| ^
|
s460556546 | p00993 | Java | import java.math.*;
import java.util.*;
public class AOJ_Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
BigInteger bi = BigInteger.ONE;
for(int i=2;i<=n+1;i++) bi = bi.multiply(BigInteger.valueOf(i));
System.out.println(bi.add(BigInteger.valueOf... | Main.java:4: error: class AOJ_Main is public, should be declared in a file named AOJ_Main.java
public class AOJ_Main {
^
1 error
|
s947232593 | p00993 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
#include<functional>
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(c.begin(),c.end()),c.end())
#define pb push_back
using namespace std;
typedef __int64 ll;
string sum(string a,string b){
string s;
int n=max(a.size... | a.cc:11:9: error: '__int64' does not name a type; did you mean '__int64_t'?
11 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:67:9: error: 'll' was not declared in this scope; did you mean 'all'?
67 | ll n;
| ^~
| al... |
s432242951 | p00993 | C++ | import java.math.*;
import java.io.*;
class Main
{
public static void main(String args[])throws IOException
{
BigInteger a = new BigInteger("1");
for(int i=2;i<=1501;i++)
a = a.multiply(new BigInteger(Integer.toString(i)));
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));... | a.cc:1:1: error: 'import' does not name a type
1 | import java.math.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:11:... |
s787205357 | p00993 | C++ | #include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long Int;
const Int B = 10000; // base (power of 10)
const int BW = 4; // log B
const int MAXDIGIT = 100; // it can represent 4*MAXDIGIT digits (in base 10)
struct BigNum {
Int digit[MAXDIGIT];
int size;
B... | a.cc: In constructor 'BigNum::BigNum(int, Int)':
a.cc:15:5: error: 'memset' was not declared in this scope
15 | memset(digit, 0, sizeof(digit));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <iomanip>
+++ |... |
s710254952 | p00993 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
typedef long long lli;
const int DIGITS = 1000;
const int BASE = 100000;
const int BD = 8;
class BigNum{
lli val[DIGITS], tmp[DIGITS];
int dig;
public:
BigNum(){
dig = 1;
memset(val, 0, sizeof(val));
}
... | a.cc: In constructor 'BigNum::BigNum()':
a.cc:20:5: error: 'memset' was not declared in this scope
20 | memset(val, 0, sizeof(val));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <vector>
+++ |+#include <cs... |
s299665081 | p00993 | C++ | #!/bin/ruby
require 'prime'
prm=Prime.instance.each.first(1500)
lcm=2
start=2
ncmp=1
x=1
factors=[2]
while ncmp<1500
start+=lcm
if (start+ncmp)%prm[x]==0 then
ncmp+=1
factors<< prm[x]
lcm*=prm[x]
x+=1
while true
f=false
(0...x).each do |e|
if (start+ncmp)%prm[e]==0 then
... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/bin/ruby
| ^
a.cc:2:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
2 | require 'prime'
| ^~~~~~~
a.cc:18:8: error: too many decimal points in number
18 | (0...x).each do |e|
| ... |
s999443630 | p00994 | C++ | #include<iostream>
#include<sstream>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define each(i,c) for(__typeof(c.begin()) i=c.begin();i!=c.end();... | a.cc: In function 'int main()':
a.cc:59:102: error: invalid types 'int[int]' for array subscript
59 | (dp[next][nl][u + pw[j] * (nu - tu)] += dp[cur][j][l][u]) %= mod;
| ... |
s784298244 | p00994 | C++ | #include <iostream>
#include <vector>
#include <string>
#define FOR(i, a, b) for(int i = (a); i < (int)(b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define MEMSET(v, s) memset(v, s, sizeof(v))
using namespace std;
vector<string> v;
const int MOD = 1e8 + 7;
int dp[10][10][60000][3];
int R, C;
int thr[11];
inline int get... | a.cc: In function 'int main()':
a.cc:7:22: error: 'memset' was not declared in this scope
7 | #define MEMSET(v, s) memset(v, s, sizeof(v))
| ^~~~~~
a.cc:61:9: note: in expansion of macro 'MEMSET'
61 | MEMSET(dp, -1);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in... |
s013530067 | p00995 | C++ | #include <stdio.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <queue>
#include <bitset>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef pair<int,int> pi;
#define F first
#define S second
#define PB push_back
const int N=1e5+10;
const ll INF=1LL<<60;
ll now=1230357... | a.cc:17:4: error: ambiguating new declaration of 'll rand()'
17 | ll rand(){
| ^~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/bits/stl_algo.h:71,
from /usr/include/c++/14/algorithm:61,
from a.cc:4:
/usr/include/stdlib.h:... |
s847888823 | p00995 | C++ | int main() {
std::vector<std::vector<std::pair<int, int>>> edges;
std::priority_queue<std::pair<int, int>> queue;
int n, m;
int a, b, c;
int q;
long long fs, fg;
std::cin >> n >> m;
edges.resize(n);
for (int i = 0; i < m; ++i) {
std::cin >> a >> b >> c;
edges[a].emplace_back(b, c);
edges... | a.cc: In function 'int main()':
a.cc:2:8: error: 'vector' is not a member of 'std'
2 | std::vector<std::vector<std::pair<int, int>>> edges;
| ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
+++ |+#include <vector>
1 | ... |
s618671916 | p00995 | C++ | int main() {
std::vector<std::vector<std::pair<int, int>>> edges;
std::priority_queue<std::pair<int, int>> queue;
int n, m;
int a, b, c;
int q;
long long fs, fg;
std::cin >> n >> m;
edges.resize(n);
for (int i = 0; i < m; ++i) {
std::cin >> a >> b >> c;
edges[a].emplace_back(b, c);
edges... | a.cc: In function 'int main()':
a.cc:2:8: error: 'vector' is not a member of 'std'
2 | std::vector<std::vector<std::pair<int, int>>> edges;
| ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
+++ |+#include <vector>
1 | ... |
s277535806 | p00995 | C++ | #include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cmath>
//#include<>
using namespace std;
typedef pair<int,int> pii;
typedef pair<int,int> Node;
typedef long long ll;
#define rep(i,j) for(i=0;i<j;i++)
#define rev_rep(i,... | a.cc:17:20: error: '#' is not followed by a macro parameter
17 | #define rev_rep(i,j) for(i=j;i>=0;i—-)
| ^
|
s229338698 | p00995 | C++ | #ifndef ___Class_RangeTree
#define ___Class_RangeTree
// ------ Includes ------ //
#include <limits>
#include <vector>
#include <algorithm>
template<typename Type> class RangeTree {
private:
int size_; std::vector<std::vector<Type> > dat;
inline int query_(int a, int b, Type x, int k, int l, int r) {
// Find rang... | a.cc: In instantiation of 'int RangeTree<Type>::query_(int, int, Type, int, int, int) [with Type = long long int]':
a.cc:32:10: required from 'int RangeTree<Type>::query(int, int, Type) [with Type = long long int]'
32 | return query_(l, r, x, 1, 0, size_);
| ^~~~~~
a.cc... |
s246920874 | p00995 | C++ | #ifndef ___Class_RangeTree
#define ___Class_RangeTree
// ------ Includes ------ //
#include <limits>
#include <vector>
#include <algorithm>
template<typename Type> class RangeTree {
private:
int size_; std::vector<std::vector<Type> > dat;
inline int query_(int a, int b, Type x, int k, int l, int r) {
// Find rang... | a.cc: In instantiation of 'int RangeTree<Type>::query_(int, int, Type, int, int, int) [with Type = long long int]':
a.cc:32:10: required from 'int RangeTree<Type>::query(int, int, Type) [with Type = long long int]'
32 | return query_(l, r, x, 1, 0, size_);
| ^~~~~~
a.cc... |
s358164956 | p00995 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long W;
const W INF = 1LL << 50;
struct edge {
int to;
W cost;
};
typedef pair<W, int> P;
typedef vector<vector <edge > > Graph;
vector<W> dijkstra(int s, const Graph& G) {
vector<W> d(G.size());
priority_queue< P, vector<P>, great... | a.cc: In member function 'int BIT<T>::lower_bound(T)':
a.cc:55:35: error: 'n_' was not declared in this scope; did you mean 'n'?
55 | int ng = -1, ok = n_ - 1;
| ^~
| n
a.cc:58:28: error: 'b' was not declared in this scop... |
s393968626 | p00995 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long W;
const W INF = 1LL << 50;
struct edge {
int to;
W cost;
};
typedef pair<W, int> P;
typedef vector<vector <edge > > Graph;
vector<W> dijkstra(int s, const Graph& G) {
vector<W> d(G.size());
priority_queue< P, vector<P>, great... | a.cc: In member function 'int BIT<T>::lower_bound(T)':
a.cc:55:35: error: 'n_' was not declared in this scope; did you mean 'n'?
55 | int ng = -1, ok = n_ - 1;
| ^~
| n
a.cc:58:28: error: 'b' was not declared in this scop... |
s573675749 | p00995 | 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
|
s209181251 | p00995 | C++ | #include <cstdio>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
typedef long long ll;
typedef pair<ll,int> P;
#define pu push
#define pb push_back
#define mp make_pair
#define INF 10000000000000000
int n,m;
ll start[100005];
ll goal[100005];
ll d[100005];
pair<ll,ll> qwe[100005];
struct e... | a.cc: In function 'int main()':
a.cc:69:9: error: 'dijkstra' was not declared in this scope; did you mean 'dijkstra1'?
69 | dijkstra(0);
| ^~~~~~~~
| dijkstra1
|
s153660142 | p00995 | C++ | #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
using namespace std;
#define FOR(i,k,n) for(int i=(k); i<(int)(n);... | a.cc: In function 'int main()':
a.cc:124:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
124 | cout<<ans<<endl;
| ^~~
| abs
|
s338299401 | p00997 | C++ | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
class UnionFind {
vector<int> p, r, a;
int find(int i) {
return i == p[i] ? i : (p[i] = find(p[i]));
}
public:
UnionFind(int n) : p(n), r(n), a(n, 1) {
for (int i = 0; i < n; ++i)
p[i] = i;
}... | a.cc: In function 'int main()':
a.cc:47:15: error: expected primary-expression before 'long'
47 | sm += long long(p.first) * uf.number(q.first) * uf.number(q.second);
| ^~~~
|
s144739628 | p00998 | Java | import java.util.Arrays;
import java.util.LinkedList;
import java.util.ArrayList
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
final int BASE_SIZE = 200;
Scanner in = new Scanner(System.in);
int nSize = in.nextInt();
int qSize = in.nextInt... | Main.java:3: error: ';' expected
import java.util.ArrayList
^
1 error
|
s878932902 | p00998 | C | /*
AizuOnline A1508
Title:RMQ
13/02/05 TE
*/
#include <stdio.h>
// Select Below
#include <stdlib.h>
//#include <string.h>
//#include <float.h>
//#include <math.h>
#include <limits.h>
//Global data section
int a[200000],n,q;
int x[200000];
int y[200000];
int z[200000];
//
void min_val(int l,int r)
{
int i,minval;
mi... | main.c: In function 'rotate':
main.c:37:3: error: implicit declaration of function 'memmove' [-Wimplicit-function-declaration]
37 | memmove(a+r,(r-l)+sizeof(int),a+r-1,(r-l)+sizeof(int));
| ^~~~~~~
main.c:13:1: note: include '<string.h>' or provide a declaration of 'memmove'
12 | #include <limits.h>
+... |
s730549977 | p00998 | C | #include <stdio.h>
#include <stdlib.h>
int number,queue,queueparam,num1,num2;
int *numberset;
int i,j;
int query(int numberset[],int queueparam,int num1,int num2){}
int problem1508(){
scanf("%d %d",number,queue);
numberset=(int *)malloc(sizeof(int)*number);
for(i=0;i<number;i++){
scanf("%d",numberset[i]);
}
... | main.c:24:5: error: redefinition of 'query'
24 | int query(int numberset[],int queueparam,int num1,int num2){
| ^~~~~
main.c:8:5: note: previous definition of 'query' with type 'int(int *, int, int, int)'
8 | int query(int numberset[],int queueparam,int num1,int num2){}
| ^~~~~
|
s137540391 | p00998 | C | #include<stdio.h>
#include<stdlib.h>
#define min(a,b)(a)<(b)?(a):(b)
#define MAX_N (1<<29)
int N;
int num[MAX_N];
int tree[2*MAX_N-1];
void init(int _n)
{
int i;
for(N=1;N<=_n;N*=2);
for(i=0;i<2*N-1;i++)
tree[i]=10000005;
}
void update(int p,int a)
{
p+=N-1;
tree[p]=a;
while(p>0)
{
p=(p-1)/2;
tree[p]=mi... | /tmp/cccz80x3.o: in function `init':
main.c:(.text+0x45): relocation truncated to fit: R_X86_64_PC32 against symbol `tree' defined in .bss section in /tmp/cccz80x3.o
/tmp/cccz80x3.o: in function `update':
main.c:(.text+0x8e): relocation truncated to fit: R_X86_64_PC32 against symbol `tree' defined in .bss section in /t... |
s270874963 | p00998 | C++ | #include "../../template/tmpl.cpp"
//insert - erase
template<typename T> struct TreapRMQ{
public:
struct Node{
T v;int p;// 値,優先度
int sz,mv;//部分木のサイズ,最小値
Node *l,*r;// l,r
Node(T v,int p):v(v),p(p),sz(1),mv(v){
l=r=NULL;
}
};
unsigned size(){return size(root);}
unsigned size(Node* t){return !t?0:t->s... | a.cc:1:10: fatal error: ../../template/tmpl.cpp: No such file or directory
1 | #include "../../template/tmpl.cpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s125362103 | p00998 | C++ | #include <cstdlib>
#include <cassert>
#include <utility>
#include <tuple>
#include <cstdio>
#include <vector>
#define loop(i,a,b) for(int i=(a);i<int(b);i++)
#define rep(i,n) loop(i,0,n)
using namespace std;
#define np nullptr
struct Node {
int val;
Node * ch[2];
int pri, cnt, sum;
int min;
Node(... | a.cc: In function 'int main()':
a.cc:140:11: error: 'time' was not declared in this scope
140 | srand(time(0));
| ^~~~
a.cc:8:1: note: 'time' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
7 | #include <vector>
+++ |+#include <ctime>
8 | #define loo... |
s286584012 | p00998 | C++ | #include <iostream>
#include <string>
#include <vector>
#define REP(i,n) for(int i=0;i<(n);++i)
using namespace std;
typedef int Data;
const int INF = 1e8;
struct RBST {
Data value;
RBST *left;
RBST *right;
int cnt;
Data minv;
RBST(Data v)
: value(v), left(nullptr), right(nullptr),
cnt(1), sum(... | a.cc: In constructor 'RBST::RBST(Data)':
a.cc:21:13: error: class 'RBST' does not have any field named 'sum'
21 | cnt(1), sum(v) {}
| ^~~
a.cc: In function 'RBST* merge(RBST*, RBST*)':
a.cc:37:8: error: 'my_rand' was not declared in this scope; did you mean 'srand'?
37 | if ((my_rand() % c... |
s193988872 | p00998 | C++ | #include <iostream>
#include <string>
#include <vector>
#define REP(i,n) for(int i=0;i<(n);++i)
using namespace std;
typedef int Data;
const int INF = 1e8;
struct RBST {
Data value;
RBST *left;
RBST *right;
int cnt;
Data minv;
RBST(Data v)
: value(v), left(nullptr), right(nullptr),
cnt(1), minv... | a.cc: In function 'RBST* merge(RBST*, RBST*)':
a.cc:37:8: error: 'my_rand' was not declared in this scope; did you mean 'srand'?
37 | if ((my_rand() % cnt_sum) < count(l)) {
| ^~~~~~~
| srand
a.cc:35:35: warning: control reaches end of non-void function [-Wreturn-type]
35 | int cnt_s... |
s816913007 | p00998 | C++ | #include <bits/stdc++.h>
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define r... | a.cc:44:11: error: redefinition of 'const int inf'
44 | const int inf=1<<29;
| ^~~
a.cc:37:11: note: 'const int inf' previously defined here
37 | const int inf=1<<29;
| ^~~
a.cc:45:11: error: redefinition of 'const int nmax'
45 | const int nmax=1000010;
| ^~~~
a.... |
s284186160 | p00998 | C++ | #include <bits/stdc++.h>
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define r... | a.cc: In function 'int main()':
a.cc:187:25: error: 'shift' was not declared in this scope
187 | shift(t,a,b+1);
| ^~~~~
a.cc:191:25: error: 'change' was not declared in this scope; did you mean '_range'?
191 | change(t,a,b);
| ... |
s483935185 | p00998 | C++ | #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include ... | a.cc:52:14: error: duplicate 'const'
52 | const Np const NIL = new Node{ Key(), nullptr, nullptr, 0, INF };
| ^~~~~
| -----
|
s753877772 | p00998 | C++ | #include "avlarray.hpp"
struct Info {
Info(int min_) : min(min_) {}
int min;
};
Info mergeInfo(Info x, Info y) {
return Info(std::min(x.min, y.min));
}
void dumpInfo(Info x) {
fprintf(stderr, "[min=%d]", x.min);
}
int main() {
AVLArray<Info> root;
int n, q;
scanf("%d %d", &n, &q);
for(int i = 0; i < n... | a.cc:1:10: fatal error: avlarray.hpp: No such file or directory
1 | #include "avlarray.hpp"
| ^~~~~~~~~~~~~~
compilation terminated.
|
s527521210 | p00998 | C++ | #include <bits/stdc++.h>
template <typename T>
constexpr T INF = numeric_limits<T>::max() / 10;
template <typename Monoid>
struct AccRandomizedBinarySearchTree {
public:
static constexpr int POOL_SIZE = 200000;
private:
struct Node {
using BaseMonoid = Monoid;
using T = typename BaseMonoid::T;... | a.cc:3:19: error: 'numeric_limits' was not declared in this scope; did you mean 'std::numeric_limits'?
3 | constexpr T INF = numeric_limits<T>::max() / 10;
| ^~~~~~~~~~~~~~
| std::numeric_limits
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:... |
s282640683 | p00998 | C++ | #include <bits/stdc++.h>
using namespace std;
#include "../tools/debug_local.hpp"
const int INF = 1001001001;
template <typename T>
class Treap {
public:
struct Node {
T val;
T data;
Node *left, *right, *parent;
double priority;
size_t size;
Node(T val) : val(val), d... | a.cc:3:10: fatal error: ../tools/debug_local.hpp: No such file or directory
3 | #include "../tools/debug_local.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s816129231 | p00998 | C++ | #include <bits/stdc++.h>
using namespace std;
#include "../tools/debug_local.hpp"
template <typename T, T ZERO>
class Treap {
public:
struct Node {
T val;
T data;
bool cached;
Node *left, *right;
int priority;
size_t size;
Node(T val) : val(val), data(val), c... | a.cc:3:10: fatal error: ../tools/debug_local.hpp: No such file or directory
3 | #include "../tools/debug_local.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s155605339 | p00998 | C++ | #include <climits>
#include <iostream>
#include <queue>
#include <cmath>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#include <set>
#include <cstdio>
inline int getInt(){ int s; scanf("%d", &s); return s
using namespace std;
int main(){
const int n = getInt();
const int q = getInt();
int c = min(2000000 / ... | a.cc: In function 'int getInt()':
a.cc:9:54: error: expected ';' before 'using'
9 | inline int getInt(){ int s; scanf("%d", &s); return s
| ^
| ;
10 |
11 | using namespace std;
| ~~~~~ ... |
s623230740 | p00998 | C++ | /*
AizuOnline A1508
Title:RMQ
13/02/05 TE
*/
#include <stdio.h>
// Select Below
#include <stdlib.h>
//#include <string.h>
//#include <float.h>
//#include <math.h>
#include <limits.h>
//Global data section
int a[200000],n,q;
int x[200000];
int y[200000];
int z[200000];
//
void min_val(int l,int r)
{
int i,minval;
mi... | a.cc: In function 'void rotate(int, int)':
a.cc:37:3: error: 'memmove' was not declared in this scope
37 | memmove(a+r,(r-l)+sizeof(int),a+r-1,(r-l)+sizeof(int));
| ^~~~~~~
a.cc:13:1: note: 'memmove' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
12 | #include ... |
s446249666 | p00998 | C++ | /*
AizuOnline A1508
Title:RMQ
13/02/05 TE
*/
#include <stdio.h>
// Select Below
#include <stdlib.h>
//#include <string.h>
//#include <float.h>
//#include <math.h>
#include <limits.h>
//Global data section
int a[200000],n,q;
int x[200000];
int y[200000];
int z[200000];
//
void min_val(int l,int r)
{
int i,minval;
mi... | a.cc: In function 'void rotate(int, int)':
a.cc:37:3: error: 'memmove' was not declared in this scope
37 | memmove(a+r,(r-l)+sizeof(int),a+r-1,(r-l)+sizeof(int));
| ^~~~~~~
a.cc:13:1: note: 'memmove' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
12 | #include ... |
s897115794 | p00998 | C++ | #include<iostream>
#include<cstdlib>
#include<vector>
#include<algorithm>
#define INF (1<<29)
using namespace std;
template<class T>
struct treap{
struct node_t{
T val;
T sum;
node_t *lch, *rch;
int pri;
int cnt;
node_t(T v, int p):val(v),pri(p),cnt(1),sum(v){
lch=rch=NULL;
}
};... | a.cc: In function 'int main()':
a.cc:104:13: error: no matching function for call to 'treap<int>::insert(int&, int&)'
104 | t.insert(i,a);
| ~~~~~~~~^~~~~
a.cc:58:11: note: candidate: 'treap<T>::node_t* treap<T>::insert(node_t*, int, T, int) [with T = int]'
58 | node_t *insert(node_t *t,int k,T val... |
s714137460 | p00998 | C++ | #include<bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
struct Treap {
struct node{
int value; // 値
node *left, *right; // *左, *右:
int priority; // 優先度
int cnt; // 部分木のサイズ
// int sum; // 部分木の和
int small; //部分木の最小値
node( int v) : value(v), priority(rand()), cnt(1), /*sum(v),*... | a.cc: In function 'int main()':
a.cc:125:4: error: expected '}' at end of input
125 | }
| ^
a.cc:89:11: note: to match this '{'
89 | int main(){
| ^
|
s424806201 | p00999 | C | main(r,t,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
r=a*A+b*B+c*C;
if(C=>d){
if(r>a*A+b*B+e*C)r=a*A+b*B+e*C;
}else{
if(r>a*A+b*B+e*d)r=a*A+b*B+e*C;
if(B+C>=d){
if(T=d-C,r>a*A+b*(B-T)+e*d)r=a*A+b*(B-T)+e*d;
}else if(A+B+C>=d){
if(T=d-B-C,r>a*(A-T)+e*d)r=a*... | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(r,t,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'r' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 't' defaults... |
s628780481 | p00999 | C | main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
r=a*A+b*B+c*C;
if(C=>d){
if(r>a*A+b*B+e*C)r=a*A+b*B+e*C;
}else{
if(r>a*A+b*B+e*d)r=a*A+b*B+e*C;
if(B+C>=d){
if(T=d-C,r>a*A+b*(B-T)+e*d)r=a*A+b*(B-T)+e*d;
}else if(A+B+C>=d){
if(T=d-B-C,r>a*(A-T)+e*d)r=a*... | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'r' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'T' defaults... |
s347592061 | p00999 | C | main(r,t,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C)>7;printf("%d\n",r)){
r=a*A+b*B+c*C;
if(C>=d){
if(r>a*A+b*B+e*C)r=a*A+b*B+e*C;
}else{
if(r>a*A+b*B+e*d)r=a*A+b*B+e*C;
if(B+C>=d){
if(T=d-C,r>a*A+b*(B-T)+e*d)r=a*A+b*(B-T)+e*d;
}else if(A+B+C>=d){
if(T=d-B-C,r>a*(A-T)+e*d)r=... | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(r,t,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C)>7;printf("%d\n",r)){
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'r' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 't' defaul... |
s962847560 | p00999 | C | #define R(x)if(r>x)r=x;
main(r,D,t,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C)>7;printf("%d\n",r)){
if(C>=d)r=a*A+b*B+e*C;
}else{
r=a*A+b*B+c*C;
D=d,d-=nc,t=A<d?A:d,A-=t,d-=t,t=B<d?B:d,B-=t,d-=t;
R(a*A+b*B+e*D)
}
}exit(0);} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(r,D,t,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C)>7;printf("%d\n",r)){
| ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'r' defaults to 'int' [-Wimplicit-int]
main.c:2:1: error: type of 'D' defa... |
s381948948 | p00999 | C | #define R(x)if(r>x)r=x;
main(r,D,t,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C)>7;printf("%d\n",r)){
r=a*A+b*B+c*C;
r=
C>=d?a*A+b*B+e*C:
D=d,d-=C,t=B<d?B:d,B-=t,d-=t,t=A<d?A:d,A-=t,d-=t,r>(t=a*A+b*B+e*D)?t:r;
}exit(0);} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(r,D,t,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C)>7;printf("%d\n",r)){
| ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'r' defaults to 'int' [-Wimplicit-int]
main.c:2:1: error: type of 'D' defa... |
s771873398 | p00999 | C++ | import java.util.*;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
while(true) {
int a, b, c, d, e;
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
d = sc.nextInt();
e = sc.nextInt();
if(a+b+c+d+e==0)
break;
int na, nb, nc;
na = sc.n... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
4 | public static void main(String args[]) {
| ^~~~~~~
| :
a.cc:4... |
s559389582 | p00999 | C++ | 70 100 340 4 200
1 1 4
70 100 340 4 200
0 1 3
70 100 340 4 200
1 1 2
0 0 0 0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 70 100 340 4 200
| ^~
|
s949885183 | p00999 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,na,nb,nc;
while(cin>>a>>b>>c>>d>>e,a!=0){
cin>>na>>nb>>nc;
int ans = 0;
int tmp_ans = 0;
for(int i=0;i<nc+nb+na;i++){
int tmp;
if(i<nc)tmp=c;
else if(i<nc+nb)tmp=b;
else if(i<nc+nb+na)tmp=a;
tmp_ans+=tm... | a.cc:32:2: error: stray '#' in program
32 | }#include<iostream>
| ^
a.cc:32:3: error: 'include' does not name a type
32 | }#include<iostream>
| ^~~~~~~
a.cc:36:5: error: redefinition of 'int main()'
36 | int main(){
| ^~~~
a.cc:5:5: note: 'int main()' previously defined here
5 | in... |
s643982765 | p01000 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <array>
using namespace std;
#defin... | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = long long int; _Searcher = long long int]':
a.cc:105:23: required ... |
s194407273 | p01000 | C++ | #include <string>
#include <iostream>
using namespace std;
string s[5][5]; char t[5][5][8]; int tc, n, m1, m2, a[27], b[27];
int main() {
while (cin >> n, n) {
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
cin >> s[i][j];
}
}
cin >> m1; for (int i = 0; i < m1; i++) cin >> a[i];
cin >> m... | a.cc: In function 'int main()':
a.cc:31:65: error: no matching function for call to 'find(int [27], int*, int&)'
31 | if (find(a, a + m1, cnt) != a + m1) t[j][k][l] = '1';
| ~~~~^~~~~~~~~~~~~~~~
... |
s474019930 | p01000 | C++ | #include <string>
#include <iostream>
using namespace std;
string s[5][5]; char t[5][5][8]; int tc, n, m1, m2, a[27], b[27];
int main() {
while (cin >> n, n) {
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
cin >> s[i][j];
}
}
cin >> m1; for (int i = 0; i < m1; i++) cin >> a[i];
cin >> m... | a.cc: In function 'int main()':
a.cc:31:65: error: no matching function for call to 'find(int [27], int*, int&)'
31 | if (find(a, a + m1, cnt) != a + m1) t[j][k][l] = '1';
| ~~~~^~~~~~~~~~~~~~~~
... |
s224903900 | p01000 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define BW(x,b) (0<=(x)&&(x)<(b))
using ... | a.cc: In function 'int main()':
a.cc:77:3: error: 'retu' was not declared in this scope
77 | retu
| ^~~~
a.cc:77:7: error: expected '}' at end of input
77 | retu
| ^
a.cc:33:11: note: to match this '{'
33 | int main(){
| ^
|
s697004114 | p01000 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define BW(x,b) (0<=(x)&&(x)<(b))
using ... | a.cc: In function 'int main()':
a.cc:77:3: error: 'retu' was not declared in this scope
77 | retu
| ^~~~
a.cc:77:7: error: expected '}' at end of input
77 | retu
| ^
a.cc:33:11: note: to match this '{'
33 | int main(){
| ^
|
s790196511 | p01002 | C++ | #include <bits/stdc++.h>
using namespace std;
int score[6];
int ans = 0;
void fallBlock(int mas[5][5])
{
for(int i = 4; i > 0; i--){
for(int j = 0; j < 5; j++){
if(mas[i][j] == 0){
swap(mas[i-1][j], mas[i][j]);
}
}
}
return;
}
void fallBlock(int mas[5][5])
{
for(int i = 4; i > 0; i--){... | a.cc:21:6: error: redefinition of 'void fallBlock(int (*)[5])'
21 | void fallBlock(int mas[5][5])
| ^~~~~~~~~
a.cc:9:6: note: 'void fallBlock(int (*)[5])' previously defined here
9 | void fallBlock(int mas[5][5])
| ^~~~~~~~~
|
s153087393 | p01002 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef long long ll;
int N;
int field[6][6];
int ss[6];
ll calc(){
ll sum=0;
int nowField[6][6]={};
for(int ... | a.cc: In function 'll calc()':
a.cc:110:3: warning: no return statement in function returning non-void [-Wreturn-type]
110 | }
| ^
a.cc: At global scope:
a.cc:111:3: error: expected unqualified-id before 'return'
111 | return sum;
| ^~~~~~
a.cc:112:1: error: expected declaration before '}' token... |
s016060016 | p01003 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include... | a.cc:27:2: error: stray '#' in program
27 |  
| ^
a.cc:29:2: error: stray '#' in program
29 |  
| ^
a.cc:31:2: error: stray '#' in program
31 |  
| ^
a.cc:37:2: error: stray '#' in program
37 |  
| ^
a.cc:40:2: error: stray '#' in program
40 |  
... |
s577195083 | p01003 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <numeric>
#include <cctype>
#include <tuple>
#include <iterator>
#include <bit... | a.cc: In function 'int main()':
a.cc:92:23: error: no matching function for call to 'std::priority_queue<state>::push(<brace-enclosed initializer list>)'
92 | q.push({s, 0, 0, 0});
| ~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/queue:66,
from a... |
s984374672 | p01006 | Java | import java.util.Scanner;
class Main{
public static final String [][] PANEL = { { "A" , "B" , "C" } ,
{ "D" , "E" , "F" } ,
{ "G" , "H" , "I" } };
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String str = sc.next();
for ( int cnt = 0;cnt < 1000;cnt++ ){
... | Main.java:28: error: ')' expected
if( Math.abs(tmp - num) != 1 OR num == -1 ){
^
Main.java:28: error: ';' expected
if( Math.abs(tmp - num) != 1 OR num == -1 ){
^
Main.java:28: error: variable declaration not allowed here
if( Math.abs(tmp - nu... |
s530370423 | p01006 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#... | a.cc: In function 'void calc(int, int, int)':
a.cc:46:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
46 | return true;
| ^~~~
|
s531019425 | p01006 | C++ | #include<bits/stdc++.h>
using namespace std;
bool hitofude(char a,char b){
if(a=='A'){
if(b=='B'||b=='D')return true;
return false;
}
if(a=='B'){
if(b=='A'||b=='E'||b=='C')return true;
return false;
}
if(a=='C') {
if(b=='B'||b=='F')return true;
return false;
}
if(a=='D'){
if(b=='A'||b=='E'||b=... | a.cc: In function 'int main()':
a.cc:50:29: error: 'hiotofude' was not declared in this scope; did you mean 'hitofude'?
50 | if(!hiotofude(s[i-1],s[i]))flg=0;
| ^~~~~~~~~
| hitofude
|
s410976176 | p01007 | C++ | #include <iostream>
using namespace std;
int n,m,r,c,si,an;
bool a[20][20],b[20][20];
void check() {
cout << endl;
cout << " --------------------------"<< endl;
for(int i=0;i<n;i++) {
for(int j=0;j<n;j++) {
cout <<a[i][j];
if(j != n-1) cout <<" ";
}
cout << endl;
}
cout << "-------------------... | a.cc: In function 'int main()':
a.cc:139:11: error: expected '}' at end of input
139 | return 0;
| ^
a.cc:80:11: note: to match this '{'
80 | int main(){
| ^
|
s467066302 | p01007 | 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
| |
s023527456 | p01007 | 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
| |
s335163645 | p01007 | C++ | #include <queue>
#include <set>
#include <cstdio>
#include <cstdlib>
using namespace std;
typedef pair<int,int> pii;
int M[15][15],N[15][15];
int D[4][2]={{-1,0},{0,-1},{1,0},{0,1}};
int main(){
int n,m,x,y,o,r,c,s,a;
scanf("%d%d",&n,&m);
for(y=0;y<n;y++)for(x=0;x<n;x++)scanf("%d",M[y]+x);
for(;m--;){
scanf("%d",... | a.cc: In function 'int main()':
a.cc:18:33: error: 'memcpy' was not declared in this scope
18 | memcpy(N,M,sizeof(M));
| ^~~~~~
a.cc:5:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s286249064 | p01007 | C++ | {
int tmp[16][16];
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
tmp[i][j]=data[i][j];
for(int j=r;j<r+s;j++)
for(int k=c;k<c+s;k++)
{
// cout<<j<<" "<<k<<"<= ";
// cout<<r+s-1-(k-c)<<" "<<c+(j-r)<<endl;
tmp[j][k]=data[r+s-1-(k-c)][c+(j-r)];
// tmp[j][k]=data[c+s-1-(k-c)][r+s-1-(j-r)];
//t... | a.cc:1:1: error: expected unqualified-id before '{' token
1 | {
| ^
a.cc: In function 'int main()':
a.cc:25:3: error: 'cin' was not declared in this scope
25 | cin>>n>>m;
| ^~~
a.cc:25:8: error: 'n' was not declared in this scope
25 | cin>>n>>m;
| ^
a.cc:25:11: error: 'm' was no... |
s220692677 | p01008 | C++ | #include<bits/stdc++.h>
using namespace std;
int getNum(char c){
if('A'<=c&&c<='Z')return 10+c-'A';
if('a'<=c&&c<='z')return 36+c-'a';
return c-'0';
}
int pto10(int p,string s){
int res=0,x=1;
for(int i=0;i<s.size();i++)res+=x*getNum(s[i]),x*=p;
return res;
}
int Cnt(int num){
int res=0;
while(num)re... | a.cc:47:3: error: expected unqualified-id before 'return'
47 | return 0;
| ^~~~~~
a.cc:48:1: error: expected declaration before '}' token
48 | }
| ^
|
s276799625 | p01008 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <numeric>
#include <cctype>
#include <tuple>
#include <iterator>
#include <bit... | a.cc: In function 'int main()':
a.cc:89:13: error: expected unqualified-id before 'xor' token
89 | int xor = 0;
| ^~~
a.cc:94:17: error: expected primary-expression before 'xor' token
94 | xor ^= split_xor(s_to_bin(base, s));
| ^~~
a.cc:94:21: error:... |
s579121524 | p01009 | C++ | #include<bits/stdc++.h>
#define N 100001
using namespace std;
typedef pair<int,int> P;
vector<P> v[N];
int n,q,a,b,c,fans,f;
string s;
int d[N];
set<P> used;
void dfs(int ans,int x){
if(f)return;
if(x==a){
fans=ans;
f=1;
return;
}
for(int i=0;i<(int)v[x].size();i++){
int nx=v[x][i].first;
i... | /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
|
s674571366 | p01009 | C++ | #include <iostream>
#include <string>
#define int long long
using namespace std;
int par[100000],rnk[100000];
void init(int n){
for(int i = 0;i < n;i++){
par[i] = i;
rnk[i] = 0;
}
}
int find(int x){
if(par[x] == x) return x;
return par[x] = find(par[x]);
}
void unite(int a,int b){
a = find(a);
b = find(b)... | cc1plus: error: '::main' must return 'int'
|
s546877078 | p01009 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define N_MAX 100000
int com[N_MAX][N_MAX];
int weight[N_MAX] = {0};
int in(int a,int b,int c)
{
if(a>b){
com[a-1][b-1] = 1;
com[b-1][a-1] = weight[b-1] - weight[a-1] - c;
}
else{
com[b-1][a-1] = 1;
com[a-1][b-1] =... | /tmp/cckVrwol.o: in function `in(int, int, int)':
a.cc:(.text+0x5d): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/cckVrwol.o
a.cc:(.text+0x77): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/cckVrwol.o
a.cc:(.text+... |
s494206211 | p01009 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define N_MAX 100000
int com[N_MAX][N_MAX];
int weight[N_MAX] = {0};
int in(int a,int b,int c)
{
if(a>b){
com[a-1][b-1] = 1;
com[b-1][a-1] = weight[b-1] - weight[a-1] - c;
}
else{
com[b-1][a-1] = 1;
com[a-1][b-1] =... | /tmp/cci26Pih.o: in function `in(int, int, int)':
a.cc:(.text+0x5d): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/cci26Pih.o
a.cc:(.text+0x77): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/cci26Pih.o
a.cc:(.text+... |
s458715270 | p01009 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define N_MAX 100000
int com[N_MAX][N_MAX] = 0;
int weight[N_MAX] = {0};
int in(int a,int b,int c)
{
if(a>b){
com[a-1][b-1] = 1;
com[b-1][a-1] = weight[b-1] - weight[a-1] - c;
}
else{
com[b-1][a-1] = 1;
com[a-1][b-... | a.cc:9:25: error: array must be initialized with a brace-enclosed initializer
9 | int com[N_MAX][N_MAX] = 0;
| ^
|
s266981542 | p01009 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define N_MAX 100000
int com[N_MAX][N_MAX] = {0};
int weight[N_MAX] = {0};
int in(int a,int b,int c)
{
if(a>b){
com[a-1][b-1] = 1;
com[b-1][a-1] = weight[b-1] - weight[a-1] - c;
}
else{
com[b-1][a-1] = 1;
com[a-1][... | /tmp/cc44ZssC.o: in function `in(int, int, int)':
a.cc:(.text+0x5d): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/cc44ZssC.o
a.cc:(.text+0x77): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/cc44ZssC.o
a.cc:(.text+... |
s979722888 | p01009 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int com[100000][100000];
int weight[100000] = {0};
int in(int a,int b,int c)
{
if(a>b){
com[a-1][b-1] = 1;
com[b-1][a-1] = weight[b-1] - weight[a-1] - c;
}
else{
com[b-1][a-1] = 1;
com[a-1][b-1] = c + weight[a-1] - ... | /tmp/cchblXal.o: in function `in(int, int, int)':
a.cc:(.text+0x5d): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/cchblXal.o
a.cc:(.text+0x77): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/cchblXal.o
a.cc:(.text+... |
s736570410 | p01009 | C++ | include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
int N,Q,a,b,c;
int com[100000][100000];
int weight[100000] = {0};
int result;
int s;
string str("COMPARE");
string str2("IN");
string str4("WARNING");
cin>>N>>Q;
for(int i = 0;i<Q;++i){
string str3;
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a typ... |
s184535538 | p01009 | C++ | #include <iostream>
#include <string>
using namespace std;
int com[100000][100000];
int weight[100000] = {0};
int main()
{
int N,Q,a,b,c;
int result;
int s;
string str("COMPARE");
string str2("IN");
string str4("WARNING");
cin>>N>>Q;
for(int i = 0;i<Q;++i){
string str3;
s = 0;
cin>>str3... | /tmp/ccsfnTtC.o: in function `main':
a.cc:(.text+0x1c3): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/ccsfnTtC.o
a.cc:(.text+0x1dd): relocation truncated to fit: R_X86_64_PC32 against symbol `weight' defined in .bss section in /tmp/ccsfnTtC.o
a.cc:(.text+0x2a4): rel... |
s356844092 | p01010 | C++ | #error "trurai"
#include <vector>
#include <iostream>
#include <complex>
#include <cmath>
using namespace std;
typedef complex<double> P;
#define X real()
#define Y imag()
const double pi = acos(-1);
double dot(P a, P b){
return a.X*b.X + a.Y*b.Y;
}
bool in_sector(P c, double r, double theta, double a, double b){... | a.cc:1:2: error: #error "trurai"
1 | #error "trurai"
| ^~~~~
|
s106118314 | p01010 | C++ | #include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265358979323846
#define EPS 1e-9
typedef long long ll;
typedef complex<double> P;
double cross(P a, P b) { return a.real() * b.imag() - a.imag() * b.real(); }
double distance(P a, P b) { return abs(a - b); }
struct light {
P pos;
double r, t, a, b;... | a.cc: In function 'int main()':
a.cc:96:18: error: no matching function for call to 'min(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)'
96 | dp[t] = min(v[t].p, dp[t]);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,... |
s386077782 | p01012 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>... | a.cc:86:10: error: 'R powl [51]' redeclared as different kind of entity
86 | R powl[51], powr[51];
| ^
In file included from /usr/include/c++/14/cmath:47,
from a.cc:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: previous declaration 'long double powl(long double, long ... |
s462026668 | p01014 | C | #include <cstdio>
#include <cstring>
#include <queue>
using namespace std;
int W,H;
char mp[22][22];
int vis[22][22];
int stx,sty;
int ans;
struct Node{
int x,y;
Node(int xx,int yy):x(xx),y(yy){}
};
queue<Node> Q;
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
bool check(int x,int y){
return x>=0&&y>=0&&x<H&&y<W;
}
void ... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s493661380 | p01024 | C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll n,m,k;
cin >> n >> m >> k;
n%=10;
m%=4;
int a=n,d[4];
for(int i=0; i<4; i++){
d[i]=a;
a=a*n%10;
}
ll ans=0;
for(int i=0; i<4; i++) {
ans+... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a... |
s470360866 | p01048 | C++ | ans o = 2^(o-1)
main = do
l <- getLine
let i = read l :: Int
o = ans i
print o | a.cc:1:1: error: 'ans' does not name a type
1 | ans o = 2^(o-1)
| ^~~
|
s843006586 | p01048 | C++ | int main(){
int n;
cin >> n;
if(n == 1) cout << 1 << endl;
if(n == 2) cout << 2 << endl;
if(n == 3) cout << 4 << endl;
if(n == 4) cout << 6 << endl;
if(n == 12) cout << 7 << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> n;
| ^~~
a.cc:4:14: error: 'cout' was not declared in this scope
4 | if(n == 1) cout << 1 << endl;
| ^~~~
a.cc:4:27: error: 'endl' was not declared in this scope
4 | if(n == 1) c... |
s321495777 | p01048 | C++ | using namespace std;
int main(){
int N;
cin>>N;
if(N==1)
cout<<1<<endl;
else if(N==2)
cout<<2<<endl;
else if(N==3)
cout<<4<<endl;
else if(N==4)
cout<<6<<endl;
else if(N==5)
cout<<16<<endl;
else if(N==6)
cout<<12<<endl;
else if(N==7)
cout<<64<<endl;
else if(N==8)
cout<<24<<endl;
else if(N==9)
cout<<... | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin>>N;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:7:2: erro... |
s888923844 | p01048 | C++ |
}using namespace std;
int main(){
int N;
cin>>N;
if(N==1)
cout<<1<<endl;
else if(N==2)
cout<<2<<endl;
else if(N==3)
cout<<4<<endl;
else if(N==4)
cout<<6<<endl;
else if(N==5)
cout<<16<<endl;
else if(N==6)
cout<<12<<endl;
else if(N==7)
cout<<64<<endl;
else if(N==8)
cout<<24<<endl;
else if(N==9)
cout... | a.cc:2:1: error: expected declaration before '}' token
2 | }using namespace std;
| ^
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | cin>>N;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by addin... |
s378577704 | p01048 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
if(N==1)
cout<<1<<endl;
else if(N==2)
cout<<2<<endl;
else if(N==3)
cout<<4<<endl;
else if(N==4)
cout<<6<<endl;
else if(N==5)
cout<<16<<endl;
else if(N==6)
cout<<12<<endl;
else if(N==7)
cout<<64<<endl;
else if(N==8)
cout<<24<<e... | a.cc: In function 'int main()':
a.cc:30:13: error: expected ';' before 'cout'
30 | else (N==12)
| ^
| ;
31 | cout<<72<<endl;
| ~~~~
|
s754406347 | p01048 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
if(N==1)
cout<<1<<endl;
else if(N==2)
cout<<2<<endl;
else if(N==3)
cout<<4<<endl;
else if(N==4)
cout<<6<<endl;
else if(N==5)
cout<<16<<endl;
else if(N==6)
cout<<12<<endl;
else if(N==7)
cout<<64<<endl;
else if(N==8)
cout<<24<<e... | a.cc: In function 'int main()':
a.cc:32:15: error: invalid operands of types 'const char [1]' and '<unresolved overloaded function type>' to binary 'operator<<'
32 | else cout<""<<endl;
| ~~^~~~~~
|
s647206914 | p01048 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int a[5]={2,3,5,7,11};
vector<int> s(0);
int i=2;
while(n!=1){
if(n%i==0){s.push_back(i); continue;}
i++;
}
int b[5]={};
for(int i=0;i<s.size();i++){
b[i]=s[i]-1;
}
sort(b,b+5);
reverse(b,b+5);
int ans=1;
... | a.cc: In function 'int main()':
a.cc:25:6: error: invalid operands of types 'int [5]' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator*'
25 | a*=pow(a[i],b[i]);
| ~^~~~~~~~~~~~~~~~
a.cc:25:6: note: in evaluation of 'operator*=(int [5], __gnu_cxx::__promote<double>::__type... |
s316029629 | p01048 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a[13] = {1 , 2 , 3 , 5 , 7 , 11 , 13 , 17 ,19 , 23 , 29 , 31 };
int b;
b = 1;
for(int i= 0,i<n;i++){
b = b * a[i];
}
cout << b << endl;
}
| a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before '<' token
9 | for(int i= 0,i<n;i++){
| ^
| ;
a.cc:9:17: error: expected primary-expression before '<' token
a.cc:9:18: error: 'n' was not declared in this scope
9 | for(int i= 0,i<n;i++){
... |
s955391053 | p01048 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cstdlib>
#include<cassert>
#include<random>
using namespace std;
int main(){
random_device r;
mt19937 mt(r());
uniform_int_distri... | In file included from /usr/include/c++/14/bits/stl_algo.h:65,
from /usr/include/c++/14/algorithm:61,
from a.cc:3:
/usr/include/c++/14/bits/uniform_int_dist.h: In instantiation of 'std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_... |
s588109517 | p01048 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cstdlib>
#include<cassert>
#include<random>
using namespace std;
int main(){
random_device r;
mt19937 mt(r());
uniform_int_distri... | In file included from /usr/include/c++/14/bits/stl_algo.h:65,
from /usr/include/c++/14/algorithm:61,
from a.cc:3:
/usr/include/c++/14/bits/uniform_int_dist.h: In instantiation of 'std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_... |
s042637761 | p01049 | C++ | w#include <bits/stdc++.h>
using namespace std;
#define loop(i,a,b) for(int i=a;i<(int)(b);i++)
#define rep(i,b) loop(i,0,b)
typedef long long ll;
// 1 indexed
int main(){
ll N;
while(cin >> N && N){
ll a,d;
ll M;
cin >> a >> d >> M;
vector<ll> x(M), y(M), z(M);
ll k;
... | a.cc:1:2: error: stray '#' in program
1 | w#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'w' does not name a type
1 | w#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:12:11: error: 'cin' was not declared in this scope
12 | while(cin >> N && N){
| ^~~
a.cc:16... |
s232556017 | p01049 | C++ | #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define INF (1<<29)
using namespace std;
typedef long long ll;
int main(){
int n,a,d,m;
cin>>n>>a>>d>>m;
map<int,int> dat;
for(int i=0;i<m;i++){
int x,y,z;
cin>>x>>... | a.cc: In function 'int main()':
a.cc:28:43: error: expected ')' before ';' token
28 | printf("%lld\n",a+(dat[k]-1)*d;
| ~ ^
| )
|
s896654973 | p01049 | C++ | #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define INF (1<<29)
using namespace std;
typedef long long ll;
int main(){
int n,a,d,m;
cin>>n>>a>>d>>m;
map<int,int> dat;
for(int i=0;i<m;i++){
int x,y,z;
cin>>x>>... | a.cc: In function 'int main()':
a.cc:28:43: error: expected ')' before ';' token
28 | printf("%lld\n",a+(dat[k]-1)*d;
| ~ ^
| )
|
s242594965 | p01049 | C++ | #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int a,m,d,n,x[11],y[11],z[11],k;
int main(){
cin>>n>>a>>d>>m;
r(i,m)cin>>x[i]>>y[i]>>z[i]:
cin>>k;
for(int i=m-1;i>=0;i--){
if(x[i])if(y[i]==k)k=z[i];
else{
if(y[i]==k)k=z[i];
else if(z[i]==k)k=y[i];
}
}
cout<<k*d+a<<end... | a.cc: In function 'int main()':
a.cc:7:36: error: expected ';' before ':' token
7 | r(i,m)cin>>x[i]>>y[i]>>z[i]:
| ^
| ;
|
s716271698 | p01052 | C++ | #include<iostream>
#include<vector>
using namespace std;
typedef pair<int, int> P;
const int D = 32;
#define REP(i, j) for(int i = 0; i < j; i++)
namespace std{
bool operator < (const P& a, const P& b) {
if(a.second != b.second) return a.second < b.second;
return a.first < b.first;
}
}
int N;
int solve(in... | a.cc: In function 'int main()':
a.cc:34:3: error: 'sort' was not declared in this scope; did you mean 'short'?
34 | sort(v.begin(), v.end());
| ^~~~
| short
|
s197155461 | p01053 | C++ | #include<bits/stdc++.h>
#include <boost/multiprecision/cpp_dec_float.hpp>
using namespace boost::math::constants;
using namespace std;
using Int = long long;
#define int long long
#define MOD 1000000007
#define rep(i, n) for(Int i = 0; i < (Int)(n); i++)
using namespace boost::multiprecision;
namespace FFT{
using d... | a.cc:2:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_dec_float.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s675093799 | p01055 | C++ | #include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climit... | a.cc: In function 'int main()':
a.cc:59:22: error: cannot bind non-const lvalue reference of type 'std::tuple<int&, int&, std::bitset<5>&>&' to an rvalue of type 'std::tuple<int&, int&, std::bitset<5>&>'
59 | tie(cost, tie(y, x, bs)) = *mm.begin();
| ~~~^~~~~~~~~~
In file included fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.