submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s195466825 | p00650 | C++ | #include <bits/stdc++.h>
using namespace std;
#define MAX 110
#define INF INT_MAX
typedef pair<int, int> pii;
struct Edge {
int from, to, cost;
Edge(int from, int to, int cost) :
from(from), to(to), cost(cost) {}
};
int N, M;
vector<Edge> G[MAX], cycle;
int color[MAX];
void dfs(int v, vector<Ed... | a.cc:20:32: error: expected initializer before 'javascript'
20 | void dfs(int v, vector<Edge> u)javascript:void(0)
| ^~~~~~~~~~
a.cc: In function 'bool solve()':
a.cc:48:17: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
48 | dfs(i, vec);
... |
s485529631 | p00650 | C++ | #include<algorithm>
using namespace std;
int main(){
int n,m;
int x[100],y[100],c[100];
int r[100],tmp1,tmp2;
int cost,total;
int i,j;
while(1){
cin >> n >> m;
if(!n && !m)break;
total = 0;
for(i=0;i<m;i++){
cin >> x[i] >> y[i] >> c[i];
total += c[i];
}
for(i=0;i<n;i++... | a.cc: In function 'int main()':
a.cc:12:5: error: 'cin' was not declared in this scope
12 | cin >> n >> m;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<algorithm>
+++ |+#include <iostream>
2 | using n... |
s419884555 | p00650 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int n,m;
int x[100],y[100],c[100];
bool use[100];
bool union_find(void){
int i,j;
int tmp,tmp2;
int g[100];
for(i=0;i<n;i++)g[i] = i;
for(i=0;i<m;i++){
if(g[x[i]]!=g[y[i]] && !use[i]){
tmp = g[x[i]];
for(j=0;j<n;j++){
if(g[j] ==... | a.cc: In function 'int main()':
a.cc:53:17: error: 'INT_MAX' was not declared in this scope
53 | else cost = INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include<algorithm>
+++ |+#include <c... |
s291010442 | p00650 | C++ | //poj 3469 2987 å¿«äº
//////////èç¹å·ã1ï¼nã,source,sink 为å
¶ä¸ä»»æç¹
#include <cstdio>
#include <cstring>
#define maxn 132
typedef __int64 LL;
LL inf;
using namespace std;
struct edge
{
int u,v,next, pre; LL f;
}e[100000];
int num,rnum; int n,m,N; int source,sink;
int head[maxn],rhead[maxn], st... | a.cc:6:9: error: '__int64' does not name a type; did you mean '__int64_t'?
6 | typedef __int64 LL;
| ^~~~~~~
| __int64_t
a.cc:7:1: error: 'LL' does not name a type; did you mean 'NULL'?
7 | LL inf;
| ^~
| NULL
a.cc:11:24: error: 'LL' does not name a type; did you mean 'NU... |
s689607293 | p00650 | C++ | #include <iostream>
#include <sstream>
#include <cstdlib>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cstdio>
#include <numeric>
#include <bitset>
#include <stack>
using namespace std;
typedef struct
{
int to... | a.cc: In function 'void add_edge(std::vector<std::vector<Edge> >&, int, int, int)':
a.cc:28:34: warning: narrowing conversion of '(&(& G)->std::vector<std::vector<Edge> >::operator[](((std::vector<std::vector<Edge> >::size_type)to)))->std::vector<Edge>::size()' from 'std::vector<Edge>::size_type' {aka 'long unsigned in... |
s167503732 | p00650 | C++ | /*
* sy.cpp
*
* Created on: 2012-10-7
* Author: Administrator
*/
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<queue>
using namespace std;
typedef long long ll;
#define zero(a) memset(a,0,sizeof(a))
const double pi = acos(-1.0);
const int... | a.cc:33:14: error: 'int index' redeclared as different kind of entity
33 | int head[N], index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:10:
/usr/include/strings.h:50:20: note: previous declaration 'con... |
s781648255 | p00650 | C++ | #include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <queue>
#include <stack>
#include <list>
#include <algorithm>
using namespace std;
#define typec __int64
#define V 111
//const typec inf = 0x3f3f3f3f;
const typec maxw = 111;
typec ... | a.cc:15:15: error: '__int64' does not name a type; did you mean '__int64_t'?
15 | #define typec __int64
| ^~~~~~~
a.cc:18:7: note: in expansion of macro 'typec'
18 | const typec maxw = 111;
| ^~~~~
a.cc:15:15: error: '__int64' does not name a type; did you mean '__int64_t'?
15 |... |
s272841233 | p00651 | C++ | cat 1066.cpp
#include <set>
#include <cstdio>
#include <algorithm>
#include <cmath>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
inline int getInt(){ int s; scanf("%d", &s); return s; }
#include <complex>
using namespace std;
typedef complex<double> P;
const double EPS = 1e-8;
const double PI = acos(0) * 2;
st... | a.cc:1:1: error: 'cat' does not name a type
1 | cat 1066.cpp
| ^~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/bits/stl_tree.h:63,
from /usr/include/c++/14/set:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits... |
s156343297 | p00652 | C++ | //import java.util.Scanner;
import java.io.*;
class Rmq{
int segt[] = new int[(1<<21)*2];
public int inp[] =new int[(1<<21)];
int MAX_VALUE=2147483647;
int min(int a,int b){return a<b?a:b;}
int max(int a,int b){return a>b?a:b;}
void update(int value,int pos,int n){
int index=n-1+pos;
segt[ind... | 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:6:11: error: expected ':' before 'int'
6 | public int inp[] =new int[(1<<21)];
| ^~~~
| :
a.cc:29:11: error: expected ':'... |
s560439618 | p00652 | C++ | #include<stdio.h>
#include<math.h>
#include<vector>
#include<algorithm>
using namespace std;
const double eps=1e-8;
int sgn(double d)
{
if (d>eps) return 1;
if (d<-eps) return -1;
return 0;
}
struct point
{
double x,y;
point(double _x=0,double _y=0):x(_x),y(_y){}
void input()
{
scanf("%lf%lf",&x,&y);... | a.cc: In function 'int main()':
a.cc:76:12: error: 'memset' was not declared in this scope
76 | memset(a,0,sizeof(a));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<algorithm>
+++ |+#include <... |
s349228198 | p00652 | C++ | #include<stdio.h>
#include<algorithm>
#include<cstring>
using namespace std;
const int INFI = 1 << 30;
const int V = 20;
int n;
int use[V], ans[V];
struct MAT
{
int lx,ly,rx,ry,id;
void rd()
{
scanf("%d%d%d%d",&lx,&ly,&rx,&ry);
}
bool operator <(const MAT &a)const
{
return lx < a.lx || (lx == a.lx && ly < a... | a.cc: In function 'int main()':
a.cc:42:29: error: 'c' was not declared in this scope
42 | if (c != -1)
| ^
a.cc:44:56: error: redeclaration of 'int c'
44 | int topx = -INFI, topy = INFI, c = -1;
| ... |
s951307040 | p00653 | C | #include <cstdio>
#include <cstring>
#include <climits>
#include <algorithm>
#include <vector>
using namespace std;
int n, dat[(1 << 21) - 1];
void init(int size)
{
int i;
n = 1;
while (n < size){
n *= 2;
}
for (i = 0; i < 2 * n - 1; i++){
dat[i] = INT_MAX;
}
}
void upda... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s415251052 | p00653 | C | #include <cstdio>
#include <cstring>
#include <climits>
#include <algorithm>
#include <vector>
using namespace std;
int n, dat[(1 << 21) - 1];
void init(int size)
{
int i;
n = 1;
while (n < size){
n *= 2;
}
for (i = 0; i < 2 * n - 1; i++){
dat[i] = INT_MAX;
}
}
void upda... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s554696149 | p00653 | C++ | #include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdlib>
#include <climits>
using namespace std;
#define ALL(c) c.begin(),c.end()
#define RALL... | a.cc:39:26: error: narrowing conversion of '-4294967297' from 'long long int' to 'long unsigned int' [-Wnarrowing]
39 | lli dat[2*MAX_N-1];
| ^
a.cc:39:24: error: size '-4294967297' of array 'dat' is negative
39 | lli dat[2*MAX_N-1];
| ~~~~~~~^~... |
s681006010 | p00653 | C++ | // library
#include<vector>
#include<algorithm>
// constant
const int INF = 1e9;
// class
class SegmentTree {
public:
SegmentTree(int x, int y);
void update(int x, int y, int value);
int find(int x1, int y1, int x2, int y2) const;
void print();
private:
void update(int index, int a1, int b1, int a2, int b2, i... | a.cc: In member function 'void SegmentTree::print()':
a.cc:76:22: error: 'cout' was not declared in this scope
76 | for(auto i: node_) cout<<" "<<i;cout<<endl;
| ^~~~
a.cc:76:35: error: 'cout' was not declared in this scope
76 | for(auto i: node_) cout<<" "<<i;cout<<endl;
| ... |
s733775842 | p00653 | C++ | #include<bits/stdc++.h>
using namespace std;
// library
#include<vector>
#include<climitts>
#include<algorithm>
// constant
const int INF = INT_MAX;
// class
class SegmentTree {
public:
SegmentTree(int x, int y);
void update(int x, int y, int value);
int find(int x1, int y1, int x2, int y2) const;
void print()... | a.cc:6:9: fatal error: climitts: No such file or directory
6 | #include<climitts>
| ^~~~~~~~~~
compilation terminated.
|
s838781567 | p00653 | C++ | #include <bits/stdc++.h>
??
using namespace std;
??
#define INF ((1LL<<31)-1)
#define D 10
??
struct SegTree {
????????int segSize, realSegSize, nodeSize;
int sz;
int *seg;
????????void init(int n) {
????????????????realSegSize = n;
??
????????????????nodeSize = 0;
????????????????for (segSize = 1; segSize < n; segSi... | a.cc:2:1: error: expected unqualified-id before '?' token
2 | ??
| ^
a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
a.cc:67:1: error: expected unqualified-id before '?' token
67 | ??
| ^
a.cc:71:1: error: expected unqualified-id before '?' token
71 | ??
| ^
|
s298282614 | p00653 | C++ | #include <bits/stdc++.h>
??
using namespace std;
??
#define INF ((1LL<<31)-1)
#define D 10
??
struct SegTree {
????????int segSize, realSegSize, nodeSize;
int sz;
int *seg;
????????void init(int n) {
????????????????realSegSize = n;
??
????????????????nodeSize = 0;
????????????????for (segSize = 1; segSize < n; segSi... | a.cc:2:1: error: expected unqualified-id before '?' token
2 | ??
| ^
a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
a.cc:67:1: error: expected unqualified-id before '?' token
67 | ??
| ^
a.cc:71:1: error: expected unqualified-id before '?' token
71 | ??
| ^
|
s464231791 | p00653 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<queue>
#include<cmath>
using namespace std;
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 10000000000
#define N 1000000000
int r,c,q;
int input;
vector<int> zu[1000];
int aaa,bbb,aa,b... | a.cc:20:16: warning: integer overflow in expression of type 'int' results in '-294967296' [-Woverflow]
20 | int dat[1000][4*N];
| ^
a.cc:20:16: error: size '-294967296' of array 'dat' is negative
a.cc: In function 'void init(int)':
a.cc:11:13: warning: overflow in conversion from 'long int' to '... |
s434618372 | p00653 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = (1LL << 31) - 1;
struct segtree {
int H, W;
vector<vector<int>> dat;
segtree(vector<vector<int>> &f) {
H = W = 1;
while(H < (int)f.size()) H <<= 1;
while(W < (int)f[0].size()) W <<= 1;
dat.assign(2 * H - 1, vector<int>(2 * ... | a.cc:43:9: error: no matching function for call to 'segtree::segtree()'
43 | segtree st;
| ^~
a.cc:10:9: note: candidate: 'segtree::segtree(std::vector<std::vector<int> >&)'
10 | segtree(vector<vector<int>> &f) {
| ^~~~~~~
a.cc:10:9: note: candidate expects 1 argument, 0 prov... |
s549714318 | p00653 | C++ | //import java.util.Scanner;
import java.io.*;
class Rmq{
int segt[] = new int[(1<<21)*2];
public int inp[] =new int[(1<<21)];
int MAX_VALUE=2147483647;
int min(int a,int b){return a<b?a:b;}
int max(int a,int b){return a>b?a:b;}
void update(int value,int pos,int n){
int index=n-1+pos;
segt[ind... | 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:6:11: error: expected ':' before 'int'
6 | public int inp[] =new int[(1<<21)];
| ^~~~
| :
a.cc:29:11: error: expected ':'... |
s845798603 | p00653 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#define N 2555555
using namespace std;
struct node {
int lx, ly, rx, ry, mx, my, f;
} tree[N * 100];
vector<int> a[N];
void build(int d, int lx, int ly, int rx, int ry) {
tree[d].lx = lx;
tree[d].rx = rx;
tree[d].ly = ly;
tree[d].ry = ry;
if (lx == rx &&... | /tmp/ccPE1kzA.o: in function `build(int, int, int, int, int)':
a.cc:(.text+0xce): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccPE1kzA.o
/tmp/ccPE1kzA.o: in function `main':
a.cc:(.text+0xe24): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bs... |
s916818051 | p00653 | C++ | #include<stdio.h>
#include<string.h>
#include<limits.h>
const int maxn = 1000000*2;
int n;
struct node
{
int x1,x2,y1,y2;
int min;
int ch[4];
};
node tree[maxn];
int tol;
void maketree(int x1,int x2,int y1,int y2)
{
int k = ++tol;
tree[k].x1 = x1;
tree[k].x2 = x2;
tree[k].y1 = y1;
t... | a.cc: In function 'void maketree(int, int, int, int)':
a.cc:66:27: error: 'min' was not declared in this scope
66 | tree[k].min = min(tree[k].min,tree[tree[k].ch[i]].min);
| ^~~
a.cc: In function 'int Query(int, int, int, int, int)':
a.cc:86:16: error: 'min' was not declar... |
s892205925 | p00653 | C++ | #include<cstdio>
#include<vector>
#define la (rt*4)
#define lb (rt*4+1)
#define lc (rt*4+2)
#define ld (rt*4+3)
#define MIN(A,B) ((A)>(B)?(B):(A))
using namespace std;
int r, c, q;
struct seg
{
int x1,y1,x2,y2;
int v;
int midx()
{
return (x1+x2)>>1;
}
int midy()
{
return (y... | a.cc: In function 'int main()':
a.cc:132:2: error: expected '}' at end of input
132 | }
| ^
a.cc:116:1: note: to match this '{'
116 | {
| ^
|
s524913510 | p00653 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int n;
int r,c,q;
int r1,c1,r2,c2;
int tmp;
vector<int> seg[1000];
void init(int num,int n_){
seq[num].clear();
for(int i=0;i<2*n_-1;i++)seg[num].push_back( (1<<31)-1 );
}
void update(int x,int k, int a){
k += n-1;
seg[x][k] = a;
... | a.cc: In function 'void init(int, int)':
a.cc:13:3: error: 'seq' was not declared in this scope; did you mean '__pstl::execution::v1::seq'?
13 | seq[num].clear();
| ^~~
| __pstl::execution::v1::seq
In file included from /usr/include/c++/14/pstl/glue_algorithm_defs.h:15,
from /usr/i... |
s119281563 | p00653 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <cstdio>
using namespace std;
const int MAX_N=4100000;
typedef long long ll;
// ZOgØðÂO[ozñ
// 0 <-> h*w-1ÌindexÉÀf[^ª¶Ý
ll dat[2*MAX_N-1];
int h,w;
const ll INF=0x7f7f7f7f7f7f7f7f;
// ú»
void init... | a.cc: In function 'void init(int, int)':
a.cc:24:5: error: 'memset' was not declared in this scope
24 | memset(dat,0x7f,sizeof(dat));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <cstdio>
+++ |+#include <c... |
s111476973 | p00653 | C++ | #include <cstdio>
#include <cstring>
#include <climits>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int H, W;
int Q;
while (1){
scanf("%d %d %d", &H, &W, &Q);
if (H + W + Q == 0){
break;
}
int Hs = (int)sqrt(H) + 1;
int Ws = (int)sqrt(W) + 1;
vector<vector<int... | a.cc: In function 'int main()':
a.cc:21:31: error: 'sqrt' was not declared in this scope
21 | int Hs = (int)sqrt(H) + 1;
| ^~~~
|
s693381433 | p00653 | 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 constructor 'RMQ::RMQ(int)':
a.cc:37:31: error: 'INT_MAX' was not declared in this scope
37 | data = vector<int>(2 * N, INT_MAX);
| ^~~~~~~
a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
14 | #in... |
s805681662 | p00653 | C++ | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
typedef int type;
const type INIT = INT_MAX;
class segment_tree {
private:
int n;
vector<type> dat;
inline type function(type a, type b) const {
return min(a, b);
}
type query(int a, int b, int k, int l, int... | a.cc:8:19: error: 'INT_MAX' was not declared in this scope
8 | const type INIT = INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <vector>
+++ |+#include <climits>
5 | using namespace... |
s070851159 | p00653 | C++ | #include<iostream>
#include<algorithm>
#include<functional>
#include<climits>
using namespace std;
template<class S=int, class T=std::less<S>, S nil=INT_MAX>
class RMQ{
friend class RMQ2D;
S *dat;
static int calcsize(int n){
int res=1;
while(res<n)res<<=1;
return res;
}
public:
RMQ():dat(0){
}
~RMQ(){
... | a.cc:35:37: error: redefinition of 'int k'
35 | void update(int k,int a,int k,int l,int r){//k番目をaに変更
| ~~~~^
a.cc:35:25: note: 'int k' previously declared here
35 | void update(int k,int a,int k,int l,int r){//k番目をaに変更
| ~~~~^
a.cc: ... |
s432940777 | p00653 | C++ | #include<iostream>
#include<algorithm>
#include<functional>
#include<climits>
using namespace std;
template<class S=int, class T=std::less<S>, S nil=INT_MAX>
class RMQ{
friend class RMQ2D;
S *dat;
static int calcsize(int n){
int res=1;
while(res<n)res<<=1;
return res;
}
public:
RMQ():dat(0){
}
~RMQ(){
... | a.cc: In member function 'void RMQ<S, T, nil>::update(int, int)':
a.cc:36:20: error: 'n' was not declared in this scope
36 | k+=n-1;
| ^
|
s994731125 | p00653 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
const int MAXN = 1000005;
long long map[MAXN];
int main()
{
long long Mina;
int i, j, r, c1, q;
int a, b, c, d;
while( cin >> r >> c1 >> q ) {
if( r == 0 && c == 0 && q == 0 )
break;
for( i = 0 ; i < r ; ++i ) {
for( j = 0 ; j < c1 ; ++j ) {
s... | a.cc: In function 'int main()':
a.cc:24:57: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<'
24 | if( map[i*c1+j] < min )
| ~~~~~~~~~~~~^~~~~
|
s236776817 | p00654 | C | // Aizu Vol-10 1069: Squid Multiplication
// 2017.8.18 bal4u@uu
#include <stdio.h>
#include <stdlib.h>
typedef unsigned long long ulong;
ulong odd[255], even[255];
int ol, el;
ulong gcd(ulong a, ulong b)
{
ulong r;
while (b != 0) r = a % b, a = b, b = r;
return a;
}
int cmp(ulong *a, ulong *b) {
if (*a < *b) re... | main.c:7:28: error: conflicting types for 'ulong'; have 'long long unsigned int'
7 | typedef unsigned long long ulong;
| ^~~~~
In file included from /usr/include/stdlib.h:514,
from main.c:5:
/usr/include/x86_64-linux-gnu/sys/types.h:148:27: note: previous declaratio... |
s325194217 | p00654 | C | #include<stdio.h>
#include<math.h>
int main()
{
__int64 b[32000];
__int64 a[300];
int N;
int i;
__int64 sum;
while(scanf("%d",&N),N)
{
for(i=0;i<N*(N+1)/2;i++)
scanf("%lld",&b[i]);
sum=b[0]*b[1]/b[N];
a[0]=(__int64)sqrt(sum);
for(i=1;i<=N;i++)
a[i]=b[i-1]/a[0... | main.c: In function 'main':
main.c:6:4: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 b[32000];
| ^~~~~~~
| __int64_t
main.c:7:4: error: unknown type name '__int64'; did you mean '__int64_t'?
7 | __int64 a[300];
| ^~~~~~~
| __int64_t
main.c:1... |
s196145852 | p00654 | C | #include<stdio.h>
#include<math.h>
long long int gcd(long long int x,long long int y)
{
while(x!=y)
{
if(x>y)
x=x-y;
else
y=y-x;
}
return x;
}
int main()
{
long long b[32000];
long long a[300];
int N;
int i;
__int64 sum;
while(scanf("%d",&... | main.c: In function 'main':
main.c:22:4: error: unknown type name '__int64'; did you mean '__int64_t'?
22 | __int64 sum;
| ^~~~~~~
| __int64_t
|
s306848189 | p00654 | C++ | //6.12
import java.util.Scanner;
import java.io.*;
import java.math.*;
import java.util.Arrays;
class Main{
long even[]=new long[1000];
long gcd(long a,long b){
return b==0?a:gcd(b,a%b);
}
void solve(int n,long oddmin){
Arrays.sort(even,0,n);
long ta=even[0];
for(int i=0;i<n;i++){
ta=gcd(ta,ev... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc... |
s603397059 | p00654 | C++ | #include<iostream>
#include<algorithm>
#include<string.h>
#include<cstdio>
#include<stack>
using namespace std;
#define LL long long
LL of[309],jf[90009], p[309];
int main(){
int n;
while(scanf("%d",&n),n){
int ol=0,jl=0;
for(int i=0; i<(n+1)*n/2;i++){
LL x;
scanf("%lld",&x);
if(x%2==0)
of[ol++] = ... | a.cc: In function 'int main()':
a.cc:26:29: error: 'sqrt' was not declared in this scope
26 | LL a0 = int(sqrt((1.0*of[0]/jf[0]*of[1]))+0.001);
| ^~~~
|
s653129473 | p00654 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdlib>
using namespace std;
typedef unsigned __int64 LL;
const int MAXN=300;
LL b,a[MAXN];
int n,m;
LL gcd(LL a,LL b){
if (!b) return a;
else return gcd(b,a%b);
}
int main()
{
while (cin>>n,n){
m=0;
for (in... | a.cc:8:26: error: expected initializer before 'LL'
8 | typedef unsigned __int64 LL;
| ^~
a.cc:10:1: error: 'LL' does not name a type
10 | LL b,a[MAXN];
| ^~
a.cc:12:1: error: 'LL' does not name a type
12 | LL gcd(LL a,LL b){
| ^~
a.cc: In function 'int main()':
a.cc:... |
s370470124 | p00654 | C++ | /*
AizuOnline A1069
Squid Multiplication
*/
#include <stdio.h>
#include <math.h>
#include <float.h>
#define DEBUG 1
#define NUMOFODD 250
long long b[NUMOFODD*(NUMOFODD+1)];
int long long evens[300];
int N = 4;
int prime[10]={2,3,5,7,11,13,17,19,23,29};
long long gcd(long long x, long long y){
return y == 0 ? x: gcd... | a.cc:45:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
45 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:56:36: error: invalid conversion from 'int (*)(long long int*, long long int*)' to '__compar_fn_t' {aka 'int (*)(const void*, const void*)'} [-fpermissive]
56 | ... |
s480537333 | p00654 | C++ | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <algorithm>
using namespace std ;
long long a0 ;
long long t1[255] ;
long long t2[320000] ;
bool cmp(long long a,long long b){
return a < b ;
}
long long gcd(long long a,long long b){
return b?gcd(b,a%b):a;
}
... | a.cc: In function 'int main()':
a.cc:46:17: error: 'prlong' was not declared in this scope; did you mean 'ulong'?
46 | prlong longf("%lld\n",a0) ;
| ^~~~~~
| ulong
a.cc:49:39: error: expected ';' before 'longf'
49 | prlong... |
s690583112 | p00654 | C++ | #include<stdio.h>
#include<math.h>
#include<map>
using namespace std;
int gcd(int m,int n)
{
int rem;
while(n>0)
{
rem = m%n;
m = n;
n = rem;
}
return m;
}
int main()
{
int n,i,b[40000],j;
while(scanf("%d",&n)!=EOF&&n)
{
map<__int64,int> mp;
for(i=0;i<n*(n+1)/2;i++)
{
scanf("%d",&b[i]);
}
for... | a.cc: In function 'int main()':
a.cc:21:21: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
21 | map<__int64,int> mp;
| ^~~~~~~
| __ynf64
a.cc:21:32: error: template argument 1 is invalid
21 | map<__int64,... |
s681529885 | p00654 | C++ | #include<stdio.h>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
int n;
__int64 a[50000],b[50000],c;
while(scanf("%d",&n)!=EOF)
{
int j=0,k=0;
if(n==0)
break;
int i;
for(i=0;i<n*(n+1)/2;i++)
{
scanf("%I64d",&c);
if(c%2==0)
{
a[j]=c;
j++;
}
else
{
b[... | a.cc: In function 'int main()':
a.cc:8:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
8 | __int64 a[50000],b[50000],c;
| ^~~~~~~
| __ynf64
a.cc:17:40: error: 'c' was not declared in this scope
17 | scanf("%I64d",&c);
|... |
s106868742 | p00654 | C++ | #include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
long long b[50005];
long long a[250];
int n;
long long kgcd( long long a, long long b)
{
if (a == 0) return b;
if (b == 0) return a;
if (!(a & 1) && !(b & 1))
return kgcd(a>>1, b>>1)<<1;
else if (!(b & 1))
re... | a.cc: In function 'int main()':
a.cc:29:32: error: 'gcd' was not declared in this scope; did you mean 'kgcd'?
29 | temp = gcd( temp , b[i] );
| ^~~
| kgcd
|
s793715136 | p00654 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
__int64 n,b[100000],i,j,yu,c[100000],l,o;
int main()
{
while(scanf("%I64d",&n)!=EOF&&n)
{
l=0;
for(i=0;i<n+n*(n-1)/2;i++)
{
scanf("%I64d",&b[i]);
if(b[i]%2==0)
c[l++]=b[i];
}
sort(c,c+l);
for(i=2;i<=c[0];i=i+2)
{
for(j=0;j<l;j++)
... | a.cc:4:2: error: '__int64' does not name a type; did you mean '__int64_t'?
4 | __int64 n,b[100000],i,j,yu,c[100000],l,o;
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:7:30: error: 'n' was not declared in this scope
7 | while(scanf("%I64d",&n)!=EOF&&n)
| ... |
s559080244 | p00655 | C++ | import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Scanner;
import java.math.BigInteger;
import java.io.*;
class Stack{
int s[]=new int[20010];
int mins[]=new int[20010];
int maxs[]=new int[20010];
int p=0,maxp=0,minp=0;
public int size(){return p;}
public boolean empt... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.FileInputStream;
| ^~~~~~
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.InputStream;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-f... |
s503985638 | p00657 | C | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int n,m;
while(scanf("%d%d",&n,&m)!=EOF)
{
if(n==0&&m==0) continue;
printf(((n&1)&&(m&1))?"no\n":"yes\n");
}
return 0;
} | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s808786177 | p00657 | C | #include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
int r, c;
void init()
{
while (scanf("%d%d", &r, &c), r || c)
{
if (r == 1 || c == 1) puts("no");
else puts("yes");
}
}
int main()
{
init();
return 0;
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s826128663 | p00657 | C | #include <queue>
#include <vector>
#include <stack>
#include <string>
#include <cstdio>
#include <math.h>
#include <cstdlib>
#include <string.h>
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
#define LL long long
#define PI acos(-1.0)
#define FRE freopen("c:\\users\\nitlian\\desktop\\i... | main.c:1:10: fatal error: queue: No such file or directory
1 | #include <queue>
| ^~~~~~~
compilation terminated.
|
s804669470 | p00657 | C++ | #include<stdio.h>
int main(){
int w,h,n;
while(1){
scanf("%d "d",&h,&w);if(w==0&&h==0)break;
if((w*h)%2==0)printf("yes\n");
else printf("no\n");
}
return 0;
} | a.cc:8:13: warning: missing terminating " character
8 | scanf("%d "d",&h,&w);if(w==0&&h==0)break;
| ^
a.cc:8:13: error: missing terminating " character
8 | scanf("%d "d",&h,&w);if(w==0&&h==0)break;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:7: erro... |
s051003276 | p00657 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int r,c;
while(cin>>r>>c,r,c){
if(r*c%2==0){
cout<<"yes"<<endl;
}
else{
cout<<"no"<<endl;
}
}
}} | a.cc:19:2: error: expected declaration before '}' token
19 | }}
| ^
|
s979189619 | p00657 | C++ | #include<iostream>
using namespace std;
main(){
int r,c;while(cin>>r>>c){cout << (r+c)%2==0?"yes":"no"<<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:41: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int')
4 | int r,c;while(cin>>r>>c){cout << (r+c)%2==0?"yes":"no"<<endl;}
... |
s049908580 | p00657 | C++ | import std.stdio;
import std.string, std.conv;
import std.algorithm, std.array;
import std.typecons;
void main() {
for(;;) {
auto s = readln.split.map!(to!int).array;
int N = s[0], M = s[1];
if(N == 0 && M == 0) break;
if((N * M) % 2 == 0) writeln("yes");
else writeln("no");
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import std.stdio;
| ^~~~~~
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 std.string, std.conv;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a... |
s343276184 | p00657 | C++ | #include<stdio.h>
main(){
int r,c;
while(1){
} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:6:2: error: expected '}' at end of input
6 | }
| ^
a.cc:2:7: note: to match this '{'
2 | main(){
| ^
|
s508640657 | p00659 | C | #include <stdio.h>
#include <string.h>
typedef struct {
char name[12];
int disp_num;
int disp_time[30];
int points;
} kyara_t;
int kyara_num;
kyara_t kyara[20];
int all_disp_num[30];
int main(void) {
int i,j;
int min_id;
while(1) {
scanf("%d",&kyara_num);
if(kyara_num==0)break;
memset(kyara,0,sizeof(ky... | main.c: In function 'main':
main.c:45:36: error: implicit declaration of function 'strcmpi'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
45 | if(strcmpi(kyara[i].name,kyara[min_id].name)>0) {
| ^~~~~~~
| ... |
s088508978 | p00659 | C++ | #error "AAA"
#include <cstdio>
#include <cassert>
#include <cstdint>
#include <vector>
#include <algorithm>
#include <string>
#include <stdexcept>
// using Tsurai()=std::out_of_range;
struct Tsurai: public std::out_of_range {
Tsurai(): std::out_of_range("") {}
};
void apply(int &lhs, char op, int rhs) {
switch (o... | a.cc:1:2: error: #error "AAA"
1 | #error "AAA"
| ^~~~~
|
s444916063 | p00659 | C++ | #error "A"
#include <cstdio>
#include <cassert>
#include <cstdint>
#include <vector>
#include <algorithm>
#include <string>
#include <stdexcept>
//#define fprintf(...) void(0)
struct Tsurai: public std::out_of_range {
Tsurai(int d): std::out_of_range(std::string("L: ")+std::to_string(d)) {}
};
void apply(int &lhs, ... | a.cc:1:2: error: #error "A"
1 | #error "A"
| ^~~~~
|
s443621624 | p00659 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc:61:16: error: 'int time [40][40]' redeclared as different kind of entity
61 | int time[40][40];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/... |
s650663097 | p00659 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc:56:16: error: 'int time [40][40]' redeclared as different kind of entity
56 | int time[40][40];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/... |
s156966724 | p00659 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc:39:16: error: 'int time [40][40]' redeclared as different kind of entity
39 | int time[40][40];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/... |
s716674081 | p00659 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc:61:16: error: 'int time [40][40]' redeclared as different kind of entity
61 | int time[40][40];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/... |
s932599513 | p00659 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc:61:16: error: 'int time [40][40]' redeclared as different kind of entity
61 | int time[40][40];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/... |
s648379639 | p00659 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc:61:16: error: 'int time [40][40]' redeclared as different kind of entity
61 | int time[40][40];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/... |
s974113573 | p00659 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc:23:16: error: 'int time [40][40]' redeclared as different kind of entity
23 | int time[40][40];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/... |
s790766743 | p00659 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>
using name... | a.cc:23:16: error: 'int time [40][40]' redeclared as different kind of entity
23 | int time[40][40];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/... |
s230798209 | p00660 | C++ | a[3]=="#..-..#" &&
a[4]=="#.|.|.#" &&
a[5]=="#..-..#") return 6;
if(a[3]=="#.....#" &&
a[5]=="#.....#") return 7;
if(a[1]=="#..-..#" &&
a[2]=="#.|.|.#" &&
a[3]=="#..-..#" &&
a[4]=="#.|.|.#" &&
a[5]=="#..-..#") return 8;
if(a[1]=="#..-..#" &&
a[2]=="#.|.|.#" &&
... | a.cc:1:6: error: 'a' does not name a type
1 | a[3]=="#..-..#" &&
| ^
a.cc:5:3: error: expected unqualified-id before 'if'
5 | if(a[3]=="#.....#" &&
| ^~
a.cc:8:3: error: expected unqualified-id before 'if'
8 | if(a[1]=="#..-..#" &&
| ^~
a.cc:14:3: error: expected unqualif... |
s292724781 | p00660 | C++ | #include <vector>
#include <algorithm>
using namespace std;
int parse(const vector<string>& subgrid)
{
unsigned s = 0;
s |= ((subgrid[1][3] == '-') << 6);
s |= ((subgrid[2][2] == '|') << 5);
s |= ((subgrid[2][4] == '|') << 4);
s |= ((subgrid[3][3] == '-') << 3);
s |= ((subgrid[4][2] == '|') << 2);
s |= (... | a.cc:5:24: error: 'string' was not declared in this scope
5 | int parse(const vector<string>& subgrid)
| ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
2 | #include <algorithm>
+++ |+#include <string>
... |
s939860665 | p00661 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>
using namespace std;
#defin... | /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
|
s422385355 | p00661 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
using namespace std;
int main()
{
long long int n, m;
while (cin >> n >> m) {
if ((n|m) == 0)
break;
vector<long long int> p(m);
for (int i = 0; i < m; ++i)
cin >> p[i];
long long int sum = (n+1) * n / 2, cnt = n;
for (int i ... | a.cc: In function 'int main()':
a.cc:22:23: error: '__gcd' was not declared in this scope
22 | lcm = lcm / __gcd(lcm, p[j]) * p[j];
| ^~~~~
|
s874755757 | p00662 | Java | public class Main {
public static void main(String[] args) {
final Scanner sc = new Scanner(System.in);
while(true){
final int math = sc.nextInt();
final int greedy = sc.nextInt();
final int geometry = sc.nextInt();
final int dp = sc.nextInt();
final int graph = sc.nextInt();
... | Main.java:6: error: cannot find symbol
final Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find symbol
final Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:47: err... |
s228957745 | p00662 | C | /*
AOJ 1077
Title:The Great Summer Contest
@kankichi573
*/
#include <stdio.h>
#define max(x,y) (((x)>(y))?(x):(y))
#define min(x,y) (((x)<(y))?(x):(y))
/*
Math
Greedy
Geometry
DP
Graph
Other
*/
int n[6];
int solve(int x1,int x2,int x3)
{
//printf("X123=%d %d %d\n",x1,x2,x3);
int r1... | main.c:52:1: error: return type defaults to 'int' [-Wimplicit-int]
52 | main()
| ^~~~
main.c:84:5: error: redefinition of 'solve'
84 | int solve(int x1,int x2,int x3)
| ^~~~~
main.c:21:5: note: previous definition of 'solve' with type 'int(int, int, int)'
21 | int solve(int x1,int x2,int x3)
... |
s888564369 | p00662 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsig... | a.cc:1:2: error: stray '#' in program
1 | #include <iostream>
| ^
a.cc:1:10: error: stray '#' in program
1 | #include <iostream>
| ^
a.cc:1:17: error: stray '#' in program
1 | #include <iostream>
| ^
a.cc:1:3: error:... |
s856979336 | p00662 | C++ | #include<iostream>
using namespace std;
int main(){
int mat,gre,geo,dp,gra,oth;
int suu,aru,jit;
int mosmin;
int cnt=0;
int end=1;
while(cin>> mat>> gre>> geo>> dp>> gra>> oth){
if(mat==0&&gre==0&&geo==0&&dp==0&&gra==0&&oth==0){
break;
}
suu=mat+dp;
aru=gre+gra;
jit=geo+oth;
... | In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/includ... |
s279986022 | p00662 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int main(){
int mat,gre,geo,dp,gra,oth;
int suu,aru,jit;
int mosmin;
while(cin>> mat>> gre>> geo>> dp>> gra>> oth,mat+gre+geo+dp+gra+oth){
suu=mat+dp;
aru=gre+gra;
jit=geo+oth;
cnt=min(suu,aru);
cnt=min(cnt,jit);
suu-=c... | a.cc: In function 'int main()':
a.cc:16:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
16 | cnt=min(suu,aru);
| ^~~
| int
|
s634260741 | p00662 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int main(){
int mat,gre,geo,dp,gra,oth;
int suu,aru,jit;
int mosmin;
while(cin>> mat>> gre>> geo>> dp>> gra>> oth,mat+gre+geo+dp+gra+oth){
suu=mat+dp;
aru=gre+gra;
jit=geo+oth;
cnt=min(suu,aru);
cnt=min(cnt,jit);
suu-=c... | a.cc: In function 'int main()':
a.cc:16:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
16 | cnt=min(suu,aru);
| ^~~
| int
|
s211577625 | p00662 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int main(){
int mat,gre,geo,dp,gra,oth;
int suu,aru,jit;
int mosmin;
int cnt=0;
while(cin>> mat>> gre>> geo>> dp>> gra>> oth,){
if((a|b|c|d|e|f) == 0) break;
suu=mat+dp;
aru=gre+gra;
jit=geo+oth;
cnt=min(suu,aru);
cnt=min(... | a.cc: In function 'int main()':
a.cc:11:48: error: expected primary-expression before ')' token
11 | while(cin>> mat>> gre>> geo>> dp>> gra>> oth,){
| ^
a.cc:12:9: error: 'a' was not declared in this scope
12 | if((a|b|c|d|e|f) == 0) break;
| ... |
s555973169 | p00662 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int main(){
int mat,gre,geo,dp,gra,oth;
int suu,aru,jit;
int mosmin;
int cnt=0;
while(cin>> mat>> gre>> geo>> dp>> gra>> oth){
if((a|b|c|d|e|f) == 0) break;
suu=mat+dp;
aru=gre+gra;
jit=geo+oth;
cnt=min(suu,aru);
cnt=min(c... | a.cc: In function 'int main()':
a.cc:12:9: error: 'a' was not declared in this scope
12 | if((a|b|c|d|e|f) == 0) break;
| ^
a.cc:12:11: error: 'b' was not declared in this scope
12 | if((a|b|c|d|e|f) == 0) break;
| ^
a.cc:12:13: error: 'c' was not declared in this scope
12... |
s948286995 | p00662 | C++ | int main(){
return 1
} | a.cc: In function 'int main()':
a.cc:2:10: error: expected ';' before '}' token
2 | return 1
| ^
| ;
3 | }
| ~
|
s266847723 | p00662 | C++ | int main(){
cout << 1 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:2:9: error: 'cout' was not declared in this scope
2 | cout << 1 << endl;
| ^~~~
a.cc:2:22: error: 'endl' was not declared in this scope
2 | cout << 1 << endl;
| ^~~~
|
s988347285 | p00662 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b,c,d,e,f,s1,s2,s3,s,p;
int main() {
while(1){
s=0;
cin>>a>>b>>c>>d>>e>>f;
s1=a+d;
s2=b+e;
s3=c+f;
if(s1+s2+s3==0){break;}
p=min(s1,min(s2,s3))
for(i=max(0,p-9);i<=p;i++){
s=max(s,i+(s1-i)/3+(s2-i)/3+(s3-i)/3);
}
cout<<s<<endl;
}
} | a.cc: In function 'int main()':
a.cc:12:37: error: expected ';' before 'for'
12 | p=min(s1,min(s2,s3))
| ^
| ;
13 | for(i=max(0,p-9);i<=p;i++){
| ~~~
a.cc:13:... |
s955122994 | p00662 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b,c,d,e,f,s1,s2,s3,s,p;
int main() {
while(1){
s=0;
cin>>a>>b>>c>>d>>e>>f;
s1=a+d;
s2=b+e;
s3=c+f;
if(s1+s2+s3==0){break;}
p=min(s1,min(s2,s3));
for(i=max(0,p-9);i<=p;i++){
s=max(s,i+(s1-i)/3+(s2-i)/3+(s3-i)/3);
}
cout<<s<<endl;
}
} | a.cc: In function 'int main()':
a.cc:13:21: error: 'i' was not declared in this scope
13 | for(i=max(0,p-9);i<=p;i++){
| ^
|
s619844113 | p00662 | C++ | #include <iostream>
using namespace std;
template<typename First, typename Second, typename... Rest>
int min(First first, Second second, Rest... rest)
{
if (first < second) return min(first, rest...);
else return min(second, rest...);
}
int min(int first, int second)
{
if (first < second) return first;
else return... | In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/includ... |
s194012798 | p00662 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d,e,f,ad,be,cf,ans,sum;
while(1){
cin>>a>>b>>c>>d>>e>>f;
if(a+b+c+d+e+f==0)break;
ans=0;
ad=a+d;
be=b+e;
cf=c+f;
ans+=min(min(ad,be),cf);
ad-=ans;
be-=ans;
cf-=ans;
ans+=ad/3;
ans+=be/3;
ans+=cf... | a.cc: In function 'int main()':
a.cc:35:14: error: no matching function for call to 'max(int&, <unresolved overloaded function type>)'
35 | cout<<max(ans,max)<<endl;
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/b... |
s352505111 | p00662 | C++ | loop do
a = gets.split.map(&:to_i)
break if a.all? {|x| x == 0}
x, y, z = a[0] + a[3], a[1] + a[4], a[2] + a[5]
n = 0
if x > 0
n += x / 3
x %= 3
if x == 0
n -= 1
x = 3
end
end
if y > 0
n += y / 3
y %= 3
if y == 0... | a.cc:1:1: error: 'loop' does not name a type
1 | loop do
| ^~~~
a.cc:4:5: error: 'x' does not name a type
4 | x, y, z = a[0] + a[3], a[1] + a[4], a[2] + a[5]
| ^
|
s258428652 | p00662 | C++ | //02
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
for(int a,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f,a|b|c|d|e|f;){
int x=a+d;
int y=b+e;
int z=c+f;
int xt=(x-1)/3;
int yt=(y-1)/3;
int zt=(z-1)/3;
x-=xt*3;
y-=yt*3;
z-=zt*3;
int ar[]={x,y,z};
sort(ar,ar+3... | a.cc: In function 'int main()':
a.cc:20:15: error: no matching function for call to 'max(int&, std::iterator_traits<int*>::difference_type)'
20 | int ex=max(ar[0],count(ar,ar+3,3));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/incl... |
s076695435 | p00662 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
while(true){
vector<int> vi(3);
for(int i=0; i<6; ++i){
int tmp;
cin >> tmp;
vi[i%3]+=tmp;
}
bool flag=true;
for(int i=0; i<3; ++i){
if(vi[i]!=0) flag=false;
}
if(flag) break;
int ans=0;
for(int ... | a.cc: In function 'int main()':
a.cc:24:82: error: 'a' was not declared in this scope
24 | int tmp=min(hoge[0],min(i,min(hoge[1],hoge[2])));a
| ^
a.cc:25:46: error: 'j' was not declared in this scop... |
s399951128 | p00663 | C++ | #include<bits/stdc++.h>
// Shrotening
#define fst first
#define snd second
#define pb push_back
// Loop
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define RFOR(i,a,b) for(long i=(a);i>=(b);--i)
#define REP(i,a) for(long i=0;i<(a);++i)
#define RREP(i,a) for(long i=(a);i>=0;--i)
#define EACH(i,a) for(auto (i)=(a).b... | a.cc:53:5: error: ISO C++ forbids declaration of 'State' with no type [-fpermissive]
53 | State(int p, int l, std::string s) {
| ^~~~~
a.cc: In member function 'int ParseState::State(int, int, std::string)':
a.cc:57:5: warning: no return statement in function returning non-void [-Wreturn-type]
57 | ... |
s875851491 | p00663 | C++ | #include <vector>
#include <string>
#include <iostream>
#include <cstdio>
using namespace std;
string x,y;
vector<string> split(string &str, const char *delim){
vector<string> result;
int cutAt;
while( (cutAt = str.find_first_of(delim)) != str.npos ){
if(cutAt > 0){
result.push_back(str.substr(0, cutAt));
}
... | a.cc: In function 'void solve(std::string&)':
a.cc:30:49: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::__cxx11::basic_string<char>)'
30 | if(prob[j][0]!='~'&&find(prob.beg... |
s521668025 | p00663 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstr... | a.cc:41:14: error: expected unqualified-id before 'not' token
41 | bool not;
| ^~~
a.cc:42:25: error: expected ',' or '...' before 'not' token
42 | lit(char c,bool not):c(c),not(not){}
| ^~~
a.cc: In constructor 'lit::lit(char, bool)':
a.cc:42:35: e... |
s326953764 | p00664 | C++ | #include <iostream>
using namespace std;
int main()
{
int r,c,q;
int a[10000],b[10000],o[10000];
int nrow,ncol;
long int out;
bool row[50000],col[50000];
while( cin >> r >> c >> q, (r||c||q))
{
for( int i = 0; i < q ; i++)
{
cin>>a[q-i-1]>>b[q-i-1]>>o[q-i-1];
}
memset(row, 0, sizeof(row));
... | a.cc: In function 'int main()':
a.cc:20:17: error: 'memset' was not declared in this scope
20 | memset(row, 0, sizeof(row));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
... |
s884132705 | p00665 | C++ | #include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#include <list>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <queue>
#include <stack>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdlib>
using namespace std;
#define ALL(c)... | a.cc: In function 'bool Check(int)':
a.cc:70:26: error: no matching function for call to 'max(int, ll)'
70 | cost+=max(0,unfavs[k-x].vote-favs[i].vote+(favs[i].name>unfavs[k-x].name));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included ... |
s131369993 | p00665 | C++ | struct S{
char s[11];
int x;
bool operator<(const S &r)const{
if(x!=r.x)return x>r.x;
return strcmp(s,r.s)<0;
}
};
S chara[100000];
int n,m,k,l;
vector<S> like, dislike;
ll calc(int m){
ll need=0;
if(dislike.size()<k-m+1)return 0;
rep(i,m){
//cerr<<"hoge: "<<dislike[k-m].x-like[i].x<<endl;
... | a.cc: In member function 'bool S::operator<(const S&) const':
a.cc:6:12: error: 'strcmp' was not declared in this scope
6 | return strcmp(s,r.s)<0;
| ^~~~~~
a.cc:1:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
+++ |+#include <cstri... |
s096566224 | p00665 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FR first
#define SC second
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define reps(i, f, n) for(int i = (int)(f); i < (int)(n); i++)
#define each(a, b) fo... | a.cc: In function 'bool check(long long int)':
a.cc:28:13: error: no matching function for call to 'max(int, long long int)'
28 | l += max(0, fav[i].first - unf[K-k].first);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/i... |
s503843119 | p00667 | C | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
static const int MOD = 100000007;
typedef __int64 ll;
ll dp[6][100001];
ll divide(char prev, int count)
{
int limit;
ll ans;
limit = 5;
if (prev == '0' || prev == '8'){
limit = 3;
}
ans = 0;
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s582169169 | p00668 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for(int i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define show(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define show(x)
#endif
s
typedef long long int ll;
typedef pair<int,int>... | a.cc:13:1: error: 's' does not name a type
13 | s
| ^
a.cc: In member function 'T segtree<T>::query(int, int, int, int, int)':
a.cc:59:48: error: 'll' was not declared in this scope; did you mean 'l'?
59 | if(b<=l or r<=a) return numeric_limits<ll>::min();
| ... |
s943601434 | p00668 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>
using namespace std;
#defin... | a.cc: In function 'void init(int)':
a.cc:40:16: error: 'INT_MAX' was not declared in this scope
40 | dat[i]=INT_MAX;
| ^~~~~~~
a.cc:16:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
15 | #include <cstring>
+++ |+#include ... |
s739215234 | p00668 | C++ | #include<iostream>
#include<queue>
using namespace std;
int main(){
int q,lim,query,x;
while(1){
deque<int> l;
cin >> q >> lim;
if(!q && !lim)break;
for(int i=0;i<q;i++){
cin >> query >> x;
if(query==0){
l.push_back(x);
if((int)l.size()>lim)l.pop_front();
}
if(query==1)l... | a.cc: In function 'int main()':
a.cc:21:31: error: no matching function for call to 'find(std::deque<int>::iterator, std::deque<int>::iterator, int&)'
21 | if(query==3)l.erase(find(l.begin(),l.end(),x));
| ~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/... |
s975603932 | p00668 | C++ | #include<cstdio>
#include<vector>
main(){for(int Q,L,q,x;scanf("%d%d",&Q,&L),Q;puts("end"))for(std::vector<int>v;Q--;){
if(v.size()>L)v.erase(v.begin());
if(scanf("%d%d",&q,&x),!q)v.push_back(x);
if(q==1)v.erase(v.begin()+x-1);
if(q==2)printf("%d\n",v[x-1]);
if(q==3)v.erase(std::find(v.begin(),v.end(),x));
}} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){for(int Q,L,q,x;scanf("%d%d",&Q,&L),Q;puts("end"))for(std::vector<int>v;Q--;){
| ^~~~
a.cc: In function 'int main()':
a.cc:8:30: error: 'find' is not a member of 'std'
8 | if(q==3)v.erase(std::find(v.b... |
s523743732 | p00668 | C++ | #include <cstdio>
#include <map>
#define MAX_Q (400000)
#define ll I64
using namespace std;
typedef __int64 lint;
int bit[MAX_Q + 1];
void add(int pos, int val)
{
while (pos <= MAX_Q){
bit[pos] += val;
pos += pos & -pos;
}
}
int sum(int pos)
{
int ret = 0;
while (pos){
ret += bit[pos];
pos &= (pos ... | a.cc:9:9: error: '__int64' does not name a type; did you mean '__int64_t'?
9 | typedef __int64 lint;
| ^~~~~~~
| __int64_t
a.cc:34:28: error: 'lint' was not declared in this scope; did you mean 'int'?
34 | void print(int x, map<int, lint> val)
| ^~~~
... |
s064633366 | p00668 | C++ | #include <cstdio>
#include <map>
#define MAX_Q (400000)
using namespace std;
typedef long long lint;
int bit[MAX_Q + 1];
void add(int pos, int val)
{
while (pos <= MAX_Q){
bit[pos] += val;
pos += pos & -pos;
}
}
int sum(int pos)
{
int ret = 0;
while (pos){
ret += bit[pos];
pos &= (pos - 1);
}
r... | a.cc: In function 'int main()':
a.cc:74:17: error: 'memset' was not declared in this scope
74 | memset(bit, 0, sizeof(bit));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <map>
+++ |... |
s074605465 | p00668 | C++ | #include <cstdio>
#include <map>
#include <cstring>
#define MAX_Q (400000)
using namespace std;
typedef long long lint;
int bit[MAX_Q + 1];
lint val[MAX_Q + 1];
void add(int pos, int val)
{
while (pos <= MAX_Q){
bit[pos] += val;
pos += pos & -pos;
}
}
int sum(int pos)
{
int ret = 0;
... | a.cc: In function 'int main()':
a.cc:74:21: error: 'erase' was not declared in this scope
74 | erase(1);
| ^~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.