submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s767302111 | p00748 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<string.h>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(... | /tmp/ccGaCcoN.o: in function `input()':
a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccGaCcoN.o
/tmp/ccGaCcoN.o: in function `main':
a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/ccGaCco... |
s804724281 | p00748 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<string.h>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(... | /tmp/ccG2Ybwc.o: in function `input()':
a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/ccG2Ybwc.o
/tmp/ccG2Ybwc.o: in function `main':
a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `C' defined in .bss section in /tmp/ccG2Ybw... |
s264407237 | p00748 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
#define REP(i,n) for(int i=0;i<(n);++i)
#define SET(a,c) memset(a,c,sizeof(a))
#define PB push_back
using namespace std;
const int MAX_N = 1e6;
const int INF = 0x3f3f3f3f;
void solve(int n)
{
vector<int> m;
int dp[MAX_N], dp_odd[MAX_N];
SET(dp, INF);
SET(dp... | a.cc: In function 'void solve(int)':
a.cc:5:18: error: 'memset' was not declared in this scope
5 | #define SET(a,c) memset(a,c,sizeof(a))
| ^~~~~~
a.cc:16:9: note: in expansion of macro 'SET'
16 | SET(dp, INF);
| ^~~
a.cc:4:1: note: 'memset' is defined in header '<cst... |
s264026555 | p00748 | C++ | #include <iostream>
using namespace std;
int main(){
int a[190]={0},b[50]={0},c[1000001]={0,1,2,3},d[1000001],k=0,i,j,n;
for(i=1;i<190;i++)a[k++]=i*(i+1)*(i+2)/6;
for(j=k=0;j<i;j++)if(a[j]%2)b[k++]=a[j];
for(i=1;i<189;i++)for(j=a[i];j<a[i+1];j++)c[j]=c[j-a[i]]+1;
for(i=0;i<36;i++)d[i]=i;
for(i=1;i<k-1;i... | a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
20 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s160740473 | p00748 | C++ | #include<iostream>
using namespace std;
int main(){
int i,j,k,t=0,a[200]={},b[200]={},c[1000005]={1000000},d[1000005]={1000000};
for(i=1;i<201;i++) {
a[i-1]=i*(i+1)*(i+2)/6;
if(m[i-1]%2==1)b[t++]=m[i-1];
}
for(i=c[0]=d[0]=0;i<200;i++) {
for(j=a[i];j<1000005;j++){
c[j]=min(c[j],c[j-a[i]]+1);
... | a.cc: In function 'int main()':
a.cc:7:8: error: 'm' was not declared in this scope
7 | if(m[i-1]%2==1)b[t++]=m[i-1];
| ^
a.cc:19:14: error: 'n' was not declared in this scope
19 | while(cin>>n,n)cout<<c[n]<<" "<<b[n]<<endl;
| ^
|
s839549573 | p00748 | C++ | #include<iostream>
using namespace std;
int main(){
int n,i,j,k,t=0,a[200]={},b[200]={},c[1000005]={1000000},d[1000005]={1000000};
for(i=1;i<201;i++) {
a[i-1]=i*(i+1)*(i+2)/6;
if(a[i-1]%2==1)b[t++]=m[i-1];
}
for(i=c[0]=d[0]=0;i<200;i++) {
for(j=a[i];j<1000005;j++){
c[j]=min(c[j],c[j-a[i]]+1);
... | a.cc: In function 'int main()':
a.cc:7:27: error: 'm' was not declared in this scope
7 | if(a[i-1]%2==1)b[t++]=m[i-1];
| ^
|
s360903816 | p00748 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int i,j,k,b[1000001],c[1000001],a[200],n;
for(i=0;n[i-1]<1000000;i++)a[i]=i*(i+1)*(i+2)/6;
for(j=0;j<=1000000;j++)ki[j]=all[j]=j;
for(j=2;j<i;j++){
for(k=n[j];k<=1000000;k++){
b[k]=min(b[k],b[k-a[j]]+1);
if(n[j]%2){
c[k]=min(c[k],... | a.cc: In function 'int main()':
a.cc:5:12: error: invalid types 'int[int]' for array subscript
5 | for(i=0;n[i-1]<1000000;i++)a[i]=i*(i+1)*(i+2)/6;
| ^
a.cc:6:26: error: 'ki' was not declared in this scope; did you mean 'k'?
6 | for(j=0;j<=1000000;j++)ki[j]=all[j]=j;
| ... |
s814996041 | p00748 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int i,j,k,b[1000001],c[1000001],a[200],n;
for(i=0;n[i-1]<1000000;i++)a[i]=i*(i+1)*(i+2)/6;
for(j=0;j<=1000000;j++)ki[j]=all[j]=j;
for(j=2;j<i;j++){
for(k=n[j];k<=1000000;k++){
b[k]=min(b[k],b[k-a[j]]+1);
if(n[j]%2){
c[k]=min(c[k],... | a.cc: In function 'int main()':
a.cc:5:12: error: invalid types 'int[int]' for array subscript
5 | for(i=0;n[i-1]<1000000;i++)a[i]=i*(i+1)*(i+2)/6;
| ^
a.cc:6:26: error: 'ki' was not declared in this scope; did you mean 'k'?
6 | for(j=0;j<=1000000;j++)ki[j]=all[j]=j;
| ... |
s109342970 | p00748 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int i,j,k,b[1e6],c[1e6],a[190],n;
for(i=0;a[i-1]<1e6;i++)a[i]=i*(i+1)*(i+2)/6;
for(j=0;j<=1e6;j++)b[j]=c[j]=j;
for(j=2;j<i;j++)for(k=a[j];k<=1e6;k++){
b[k]=min(b[k],b[k-a[j]]+1);
if(a[j]%2)c[k]=min(c[k],c[k-a[j]]+1);
}
while(cin>>n,n)cout<<b[n]... | a.cc: In function 'int main()':
a.cc:4:15: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
4 | int i,j,k,b[1e6],c[1e6],a[190],n;
| ^~~
a.cc:4:15: error: could not convert '1.0e+6' from 'double' to 'long unsigned int'
4 | int i,j,k,b[1e6],c[1e6],a... |
s803057603 | p00748 | C++ | #include "stdafx.h"
#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <algorithm>
#include <tuple>
#include <set>
#include <stack>
#include <queue>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s121731602 | p00748 | C++ |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int ... | a.cc: In function 'int main()':
a.cc:33:15: error: request for member 'size' in 'v', which is of non-class type 'int [200]'
33 | FOR(j,0,v.size()) {
| ^~~~
a.cc:18:42: note: in definition of macro 'FOR'
18 | #define FOR(I,A,B) for(int I = (A); I < (B); ++I)
| ... |
s956615696 | p00748 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int tetrahedron(int);
int index_direct_match(int);
int index_direct_match_odd(int);
int index_number(int);
int index_number_odd(int);
int main(int argc, char const *argv[]) {
int n;
int cnt_min;
int cnt_only_odd;
for(cin >> n;n !... | a.cc: In function 'int main(int, const char**)':
a.cc:21:1: error: expected primary-expression before ':' token
21 | :
| ^
|
s180808087 | p00748 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<complex>
#define INF 1e9
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair
#define F first
#define S second
... | a.cc: In function 'int main()':
a.cc:30:95: error: 'su' was not declared in this scope; did you mean 'gu'?
30 | if(((cnt*(cnt+1)*(cnt+2))/6)%2){ki.pb(cnt*(cnt+1)*(cnt+2)/6);dp[ki[ki.size()-1]]=1;dp2[gu[su.size()-1]]=1;}
| ... |
s460153913 | p00748 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
const ll mod = ll(1e9) + 7;
const int INF = int(1e9);
int dp[1000000] = {};
int dp_o[1000000] = {};
map<int, int>mp, mp_o;
int ... | a.cc: In function 'int main()':
a.cc:65:17: error: 'cou' was not declared in this scope; did you mean 'cos'?
65 | cou << DP_o(Q) << endl;
| ^~~
| cos
|
s252038670 | p00748 | 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
| |
s424188218 | p00748 | C++ | #include<bits/stdc++.h>
#define lp(i,n) for(int i=0;i<n;i++)
#define lpin(a,i,n) for(int i=0;i<n;i++){cin>>a[i];}
using namespace std;
int ans[100000],check[100000];
int main(){
list<int> l;
list<int>::iterator it;
it = l.end();
int n;
cin>>n;
lp(i,n){
int a,b;
cin>>a;
if(a==0){
cin>>b;
... | a.cc: In function 'int main()':
a.cc:23:21: error: no match for 'operator+' (operand types are 'std::__cxx11::list<int>::iterator' and 'int')
23 | it = l.begin()+b;
| ~~~~~~~~~^~
| | |
| | int
| std::__cxx11::list<int>::... |
s664920679 | p00748 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <utility>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(i,x) for(auto i=(x).begin(); i!=(x).end();i++)
#define Sort(x... | a.cc: In function 'int main()':
a.cc:20:13: error: 'INT_MAX' was not declared in this scope
20 | #define INF INT_MAX
| ^~~~~~~
a.cc:42:38: note: in expansion of macro 'INF'
42 | rep(i,0,1000010) ans1[i]=ans2[i]=INF;
| ^~~
a.cc:12:1: note: 'INT_MAX' ... |
s682435788 | p00748 | C++ | #include <cstdio>
#include <algorithm>
#include <iostream>
using namespace std;
int dp[1000001],Odp[1000001];
int Tn[200],OTn[200];
int main(){
int count = 0; //pollocks numberの生成
for(int i = 1;i < 200;i++){
Tn[i-1] = i * (i + 1) * (i + 2) / 6;
if(Tn[i-1] % 2 == 1){
OTn[count] = T... | a.cc: In function 'int main()':
a.cc:41:22: error: invalid types 'int[int]' for array subscript
41 | cout << dp[k][n] << ' ' << Odp[k1][n] << endl;
| ^
a.cc:41:44: error: invalid types 'int[int]' for array subscript
41 | cout << dp[k][n] << ' ' << Odp[k1][n] << endl;
... |
s453824216 | p00748 | C++ | #include <cstdio>
#include <algorithm>
#include <iostream>
using namespace std;
int dp[1000001],Odp[1000001];
int Tn[200],OTn[200];
int main(){
int count = 0; //pollocks numberの生成
for(int i = 1;i < 200;i++){
Tn[i-1] = i * (i + 1) * (i + 2) / 6;
if(Tn[i-1] % 2 == 1){
OTn[count] = T... | a.cc: In function 'int main()':
a.cc:41:22: error: invalid types 'int[int]' for array subscript
41 | cout << dp[k][n] << ' ' << Odp[k1][n] << endl;
| ^
a.cc:41:44: error: invalid types 'int[int]' for array subscript
41 | cout << dp[k][n] << ' ' << Odp[k1][n] << endl;
... |
s577062570 | p00748 | 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
| |
s681086518 | p00748 | C++ | #include <iostream>
#define MAX 1000000
#define INF 1000000000
using namespace std;
int dp1[MAX+1],dp2[MAX+1];
int main(){
//INFで初期化
for(int i = 1;i <= MAX;i++){
dp1[i] = INF;
dp2[i] = INF;
}
for(int n = 1;n * (n + 1) * (n * 2) /6 <= MAX;n++){
int a = n * (n + 1) * (n + 2) / 6... | a.cc: In function 'int main()':
a.cc:35:2: error: expected '}' at end of input
35 | }
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s559473644 | p00748 | 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
| |
s788627080 | p00748 | 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
| |
s352545040 | p00748 | C++ | #include <iostream>
using namespace std;
#define MAX 1000000
#define INF 1000000000
int dp1[MAX], dp2[MAX];
int main()
{
for (int i = 1; i <= MAX; i++)
{
dp1[i] = INF;
dp2[i] = INF;
}
for (int n = 1; n * (n + 1) * (n + 2) / 6 <= MAX; n++)
{
int a = n * (n + 1) * (n + 2) / ... | a.cc: In function 'int main()':
a.cc:32:16: error: 'n' was not declared in this scope
32 | cin >> n;
| ^
|
s610585074 | p00748 | 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
| |
s200179790 | p00748 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
int v[200];
static int ansA[1000000], ansB[1000000];
for (int i = 0; i<=200; i++) v[i] = i * (i + 1)*(i + 2) / 6;
ansA[0] = ansB[0] = 0;
for (int i = 1; i<1000000; i++) {
ansA[i] = ansB[i] = i;
for (int j = 0; i - v[j] >= 0; j++) {
ansA[i] = mi... | a.cc: In function 'int main()':
a.cc:14:48: error: 'A' was not declared in this scope
14 | ansA[i] = min(ansA[i], A[i - v[j]] + 1);
| ^
|
s269954332 | p00748 | C++ | #include<iostream>
#include<queue>
#include<utility>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define mp make_pair
typedef pair<int,int> pi;
const int inf=1<<28;
const int MX=1000000;
int tri[1000],ntri;
int dp[MX],dpOdd[MX];
int main(){
ntri=0;
for(;;ntri++)
{
tri[ntri]=ntri*(ntri+1)*(ntri... | a.cc: In function 'int main()':
a.cc:25:9: error: 'dbg' was not declared in this scope
25 | dbg(ntri);
| ^~~
|
s560874081 | p00748 | C++ | #include<stdio.h>
#include<math.h>
#define MAX (int)1e+6
int main(void){
int i,j,n;
int a[181],b[46];
int dp1[MAX],dp2[MAX];
b[0] = 0;
j = 1;
for(i=0;i<181;i++){
a[i] = i * (i+1) * (i+2) / 6;
if(a[i]&1)b[j++] = a[i];
}
for(i=0;i<MAX;i++)dp1[i] = dp2[i] = 1000000;
for(i=0;i<MAX;i++){
fo... | a.cc: In function 'int main()':
a.cc:21:26: error: 'min' was not declared in this scope; did you mean 'std::min'?
21 | if(i>a[j])dp1[i] = min(dp1[i],dp1[i-a[j]]+1);
| ^~~
| std::min
In file included from /usr/include/c++/14/bits/specfun.h:43,
... |
s188269841 | p00748 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int f[1000000];
int main()
{
int t_num[182];
int t_num_odd[182];
int k=0;
for (int i=1;i<182;++i)
{
t_num[i-1] = i*(i+1)*(i+2)/6;
if (t_num[i-1] % 2 == 1)
{
t_num_odd[k] = t_num[i-1];
++k;
}
}
int n;
cin >> n;
while (n)
{
mem... | a.cc: In function 'int main()':
a.cc:29:17: error: 'memset' was not declared in this scope
29 | memset(f,1000001,sizeof(f));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cmath>
+++... |
s018392581 | p00748 | C++ | #define INF 0x7FFFFFFF
int main(void){
int i, j, k, n, min1;
int dp[1000001];
scanf("%d",&n);
while(n != 0){
for(i = 0;i <= n;i++)
dp[i] = INF;
dp[0] = 0;
for(k = 0;k < n;k++){
for(i = n;i >= 0;i--){
if(dp[i] != INF){
for(j = 1;(j * (j + 1) * (j + 2)) / 6 + i <= n;j++){
if(dp[(j * (j + 1... | a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf' was not declared in this scope
6 | scanf("%d",&n);
| ^~~~~
a.cc:40:17: error: 'printf' was not declared in this scope
40 | printf("%d %d\n",min1,dp[n]);
| ^~~~~~
a.cc:1:1: note: 'printf' is define... |
s261969060 | p00748 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void)
{
int n;
int i1,i2;
int nn;
int p;
int min;
int num;
while(1){
cin >> n;
if(n==0) break;
vector<int> pollock(n+1,0);
vector<int> pollock2(n+1,0);
vector<int> p;
vector<int> p2;
nn=1;
num=(nn*(nn+1)*(nn+2))/6);
for(i1... | a.cc: In function 'int main()':
a.cc:24:41: error: expected ';' before ')' token
24 | num=(nn*(nn+1)*(nn+2))/6);
| ^
| ;
a.cc:33:65: error: expected ';' before ')' token
33 | ... |
s869998522 | p00748 | C++ | #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#define X first
#define Y second
using namespace std;
int index;
int fourth[201];
int odd[201];
int mintable[1500000];
i... | a.cc:16:5: error: 'int index' redeclared as different kind of entity
16 | int index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:11:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(cons... |
s073360849 | p00748 | C++ | #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#define X first
#define Y second
using namespace std;
int index;
int fourth[201];
int odd[201];
int mintable[1500000];
i... | a.cc:16:5: error: 'int index' redeclared as different kind of entity
16 | int index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:11:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(cons... |
s650603256 | p00748 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int MAX;
vector<int> V;
vector<int> D;
int N;
int M;
bool dp[10][100000] = {0};
void solve(int n) {
int ans = 1;
for (int i=0; V[i]<=n; i++)
dp[0][V[i]] = 1;
for (int i=1; i<5 && !dp[i-1][n]; i++) {
ans++;
for (int j=0; j<=n; j++)... | a.cc: In function 'void solve(int)':
a.cc:32:9: error: 'memset' was not declared in this scope
32 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <cmath>
+++ |+#include <c... |
s699682719 | p00748 | C++ | #include <iostream>
#include <algorithm>
#define MAXNUM 1000000
#define MAX 100
using namespace std;
int all[MAXNUM], odd[MAXNUM], fourall[MAXNUM], fourodd[MAXNUM];
int _tmain(int argc, _TCHAR* argv[])
{
int n;
int counter = 0;
for (int i = 1; i < MAXNUM; i++){
all[i] = MAX;
odd[i] = MAX;
}
//1からMAXNUMまで... | a.cc:11:22: error: '_TCHAR' has not been declared
11 | int _tmain(int argc, _TCHAR* argv[])
| ^~~~~~
|
s604849364 | p00748 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<functional>
#define rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
using namespace std;
#define ull unsigned long long
int memo[150];
int dp[1000002];
int dp2[1000002];
void inset(){
dp[0]=0;
fill(dp,dp+1000001,10000);
fill(dp2,dp2+1000001,10... | a.cc:32:1: error: expected declaration before '}' token
32 | }
| ^
|
s365940372 | p00748 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
#define REP_N(i,n,s) for(ll i=0; i<(ll)n; i+=s)
#define REP(i,n) REP_N(i,n,1)
ll table[1000000];
ll pollock[1000001];
ll dp[1000001];
void solution(ll output[1000001], int interval) {
output[0] = 0;
ll current_i = interval-1;
REP... | a.cc:19:45: error: macro "REP" passed 3 arguments, but takes just 2
19 | REP(j, current_i+1, interval) if(j!=0) minimum = min(output[i - table[j]] + 1, minimum);
| ^
a.cc:8:9: note: macro "REP" defined here
8 | #define REP(i,n) REP_N(i,n,1)
... |
s795134746 | p00749 | C++ | #include <stdio.h>
#include <iostream>
#include <queue>
#include <algorithm>
#include <vector>
#include <stack>
using namespace std;
#define REP(i,a,b)for(int i=a;i<b;i++)
struct POINT{
int x;
int y;
int c;
POINT(){};
POINT(int X,int Y,int C){
x=X;y=Y;c=C;
}
};
struct BLOCK{
POINT pt[4];
bool flag;
};
str... | a.cc: In function 'int main()':
a.cc:176:2: error: expected '}' at end of input
176 | }
| ^
a.cc:135:15: note: to match this '{'
135 | int main(void){
| ^
|
s372030510 | p00749 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <functional>
using namespace std;
#define rep(i,n) for(int i = 0;i < n;i++)
#define each(i,n) for(auto i : n)
struct P {
int y, x;
};
struct B {
vector<P> p;
set<int> c;
int parent;
char uni;
double all;
double xl, xr;
double ... | a.cc: In function 'int main()':
a.cc:43:35: error: 'memset' was not declared in this scope
43 | bool use[10][60]; memset(use, 0, sizeof(use));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstr... |
s589349761 | p00749 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <functional>
using namespace std;
#define rep(i,n) for(int i = 0;i < n;i++)
#define each(i,n) for(auto i : n)
struct P {
int y, x;
};
struct B {
vector<P> p;
set<int> c;
int parent;
char uni;
double all;
double xl, xr;
double ... | a.cc: In function 'int main()':
a.cc:43:35: error: 'memset' was not declared in this scope
43 | bool use[10][60]; memset(use, 0, sizeof(use));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstr... |
s354565532 | p00749 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <functional>
#include <cstring>
using namespace std;
#define double long double
#define rep(i,n) for(int i = 0;i < n;i++)
#define each(i,n) for(auto i : n)
struct P {
int y, x;
};
struct B {
vector<P> p;
set<int> c;
int parent;
c... | a.cc: In lambda function:
a.cc:10:16: error: expected primary-expression before 'long'
10 | #define double long double
| ^~~~
a.cc:101:64: note: in expansion of macro 'double'
101 | b[m].xr = max(b[m].xr, double(i.x + 0.5l));
| ... |
s843671769 | p00749 | C++ | #include <iostream>
#include <vector>
#include <stdlib>a
using namespace std;
struct Node{
int XL;
int XR;
double XG;
vector<Node*> next;
};
int w, h;
char p[100][100];
int pieceNum;
void getPiece(int w0, int h0, int num, vector<int>* pieceX, vector<int>* pieceY)
{
if(w0 < 0 || w0 >= w || h0 < 0 || h0 >= h) r... | a.cc:3:10: fatal error: stdlib>: No such file or directory
3 | #include <stdlib>a
| ^~~~~~~~~
compilation terminated.
|
s699548298 | p00749 | C++ | #include <iostream>
#include <vector>
#include <stdlib>a
using namespace std;
struct Node{
int XL;
int XR;
double XG;
vector<Node*> next;
};
int w, h;
char p[100][100];
int pieceNum;
void getPiece(int w0, int h0, int num, vector<int>* pieceX, vector<int>* pieceY)
{
if(w0 < 0 || w0 >= w || h0 < 0 || h0 >= h) r... | a.cc:3:10: fatal error: stdlib>: No such file or directory
3 | #include <stdlib>a
| ^~~~~~~~~
compilation terminated.
|
s645691061 | p00749 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,... | a.cc:43:12: error: 'std::vector<std::vector<int> > index' redeclared as different kind of entity
43 | vector<vi> index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+... |
s033157584 | p00749 | C++ | #include<stdio.h>
#include<math.h>
#include<algorithm>
#include<utility>
#include<queue>
#include<string.h>
#include<string>
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
#define _CRT_SECURE_NO_WARNINGS
int w, h;
char c[62][7];
bool checked[62][7] = {};
queue<P> Q;
int dx[3] = { 1,0,-1 };
int dy... | a.cc: In function 'void SetLRT(int, int)':
a.cc:44:9: error: reference to 'hash' is ambiguous
44 | hash[_y][_x] = nowHash;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_bvector.h:65,
from /usr/include/c++/14/vector:67,
from /usr/include/c++/14/queue... |
s823117201 | p00749 | C++ | #include<stdio.h>
#include<math.h>
#include<algorithm>
#include<utility>
#include<queue>
#include<string.h>
#include<string>
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
#define _CRT_SECURE_NO_WARNINGS
int w, h;
char c[62][7];
bool checked[62][7] = {};
queue<P> Q;
int dx[3] = { 1,0,-1 };
int dy... | a.cc: In function 'void SetLRT(int, int)':
a.cc:44:9: error: reference to 'hash' is ambiguous
44 | hash[_y][_x] = nowHash;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_bvector.h:65,
from /usr/include/c++/14/vector:67,
from /usr/include/c++/14/queue... |
s392486869 | p00749 | C++ | #error "tsurai"
#include <cstdio>
#include <cstdint>
#include <cassert>
#include <vector>
#include <algorithm>
#include <string>
#include <utility>
#include <queue>
#include <set>
using Coord=double;
using Point=std::pair<int, Coord>;
using Index=std::pair<size_t, size_t>;
const size_t di[]={size_t(-1), 0, 1, 0};
co... | a.cc:1:2: error: #error "tsurai"
1 | #error "tsurai"
| ^~~~~
|
s672859306 | p00749 | C++ | #include <iostream>
#include <string>
#include <queue>
using namespace std;
char dx[] = {0, 1, 0, -1};
char dy[] = {1, 0, -1, 0};
int w, h;
string s[60];
bool check[60][10];
bool isStable(int _y, int _x, int *rootM, int *rootCnt){
bool res = true;
int M = 2, cnt = 4, XL = 100, XR = -100;
queue< pair<int... | a.cc: In function 'int main()':
a.cc:46:9: error: 'memset' was not declared in this scope
46 | memset(check, false, sizeof(check));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++ |+#inclu... |
s932681673 | p00749 | C++ | #include <iostream>
#include <sstream>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
using namespace std;
void solve... | a.cc: In function 'void solve(int, int, std::vector<std::vector<int> >)':
a.cc:27:36: error: 'INT_MAX' was not declared in this scope
27 | int left = INT_MAX;
| ^~~~~~~
a.cc:17:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixab... |
s674509878 | p00749 | C++ | #include <iostream>
#include <sstream>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
using namespace std;
void solve... | a.cc: In function 'void solve(int, int, std::vector<std::vector<int> >)':
a.cc:27:36: error: 'INT_MAX' was not declared in this scope
27 | int left = INT_MAX;
| ^~~~~~~
a.cc:17:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixab... |
s258216444 | p00749 | C++ | // ACM-ICPCà\I2010 D. ®ç®ç
#include <iostream>
#include <string>
#include <queue>
using namespace std;
char dx[] = {0, 1, 0, -1};
char dy[] = {1, 0, -1, 0};
int w, h;
string s[60];
bool check[60][10];
bool isStable(int _y, int _x, int *rootM, int *rootCnt){
bool res = true;
int M = 2, cnt = 4, XL ... | a.cc: In function 'int main()':
a.cc:48:9: error: 'memset' was not declared in this scope
48 | memset(check, false, sizeof(check));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <queue>
+++ |+#inclu... |
s093195603 | p00749 | C++ | #include <iostream>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdlib>
#include <queue>
#include <cstdio>
#include <memory>
#include <cctype>
using namespace std;
const double EPS = 1e-10;
const int INF = 1 << 30;
typedef pair<double, double> Pd;
typedef pair<in... | a.cc:24:1: error: reference to 'data' is ambiguous
24 | data dat[600];
| ^~~~
In file included from /usr/include/c++/14/string:53,
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,
... |
s824387830 | p00749 | C++ | #include <iostream>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdlib>
#include <queue>
#include <cstdio>
#include <memory>
#include <cctype>
using namespace std;
const double EPS = 1e-10;
const int INF = 1 << 30;
typedef pair<double, double> Pd;
typedef pair<in... | a.cc:24:1: error: reference to 'data' is ambiguous
24 | data dat[600];
| ^~~~
In file included from /usr/include/c++/14/string:53,
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,
... |
s075863301 | p00749 | C++ | #include <iostream>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdlib>
#include <queue>
#include <cstdio>
#include <memory>
#include <cctype>
using namespace std;
const double EPS = 1e-10;
const int INF = 1 << 30;
typedef pair<double, double> Pd;
typedef pair<in... | a.cc:24:1: error: reference to 'data' is ambiguous
24 | data dat[600];
| ^~~~
In file included from /usr/include/c++/14/string:53,
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,
... |
s411956660 | p00749 | C++ | #include <iostream>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdlib>
#include <queue>
#include <cstdio>
#include <memory>
#include <cctype>
using namespace std;
const double EPS = 1e-10;
const int INF = 1 << 30;
typedef pair<double, double> Pd;
typedef pair<in... | a.cc:24:1: error: reference to 'data' is ambiguous
24 | data dat[600];
| ^~~~
In file included from /usr/include/c++/14/string:53,
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,
... |
s986297529 | p00749 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int parent[600],sum[600],l[600],r[600],n[600];
int Find(int x){
if(parent[x] != x) parent[x] = Find(parent[x]);
return parent[x];
}
void Union(int x, int y){
x = Find(x); y = Find(y);
if(x != y){
parent[x] = y;
... | a.cc: In function 'int main()':
a.cc:81:9: error: 'memset' was not declared in this scope
81 | memset(done,0,sizeof done);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <algorithm>
+++ |+#include <c... |
s168883764 | p00749 | C++ | #include<iostream>
#include<queue>
#include<vector>
#include<string>
#include<map>
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(all(c)),c.end())
#define pb push_back
using namespace std;
typedef pair<int,int> P;
typedef pair<double,int> Pdi;
int w,h;
vector<string> s;
int dx[]={0,0,1,-1},dy[]={1,-1,0,... | a.cc: In function 'Pdi ret(int, int, std::vector<std::vector<bool> >&)':
a.cc:58:9: error: 'sort' was not declared in this scope; did you mean 'short'?
58 | sort(all(next));
| ^~~~
| short
a.cc:7:24: error: 'unique' was not declared in this scope
7 | #define uni(c) c.erase(uni... |
s453588180 | p00749 | C++ | #include <iostream>
#include <queue>
#include <cmath>
using namespace std;
typedef struct st1
{
int x;
int y;
}coord;
typedef struct st2
{
double sumofx;
int count;
}up;
int w,h;
char p[60][10];
bool visit[60][10];
bool stable;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
void find_blocks(int x... | a.cc: In function 'int main()':
a.cc:115:17: error: 'memset' was not declared in this scope
115 | memset(visit,0,sizeof(visit));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <cmath>
... |
s171691247 | p00749 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<string>
#include<queue>
#include<complex>
#include<set>
#include<map>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
const int H = 66;
const int W = 11;
const int INF = 1000000000;
int w,h;
string masu[H];
... | a.cc: In function 'void make_edge_foot()':
a.cc:103:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
103 | sort(edge[i].begin(),edge[i].end());
| ^~~~
| sqrt
a.cc:104:31: error: 'unique' was not declared in this scope
104 | ... |
s549942890 | p00749 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<string>
#include<queue>
#include<complex>
#include<set>
#include<map>
#include<algorithm>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
const int H = 66;
const int W = 11;
const int INF = 1000000000;
int w... | a.cc: In function 'std::string solve()':
a.cc:158:29: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
158 | bool ans = saiki(0, vector<int>(w));
| ^~~~~~~~~~~~~~
a.cc:118:34: note: initializing argument 2 of ... |
s522924350 | p00749 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include <cstring>
#include <string>
#include <cstdlib>
#include <cstdio>
using namespace std;
typedef long long int ll;
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#d... | a.cc: In function 'int dfs(int)':
a.cc:50:28: error: lvalue required as left operand of assignment
50 | if(peace[r].ps.size() = 0) return 1;
| ~~~~~~~~~~~~~~~~^~
a.cc: At global scope:
a.cc:77:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
77 | main(){
... |
s187666149 | p00750 | Java | import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.container;
import std.array;
import std.math;
import std.range;
import std.typecons;
pragma(msg, min("a", "aa"));
pragma(msg, min("~", "aa"));
void main()
{
for (;;)
{
int n, a, s, g;
{
auto i = readln.chomp.split... | Main.java:11: error: class, interface, enum, or record expected
pragma(msg, min("a", "aa"));
^
Main.java:12: error: class, interface, enum, or record expected
pragma(msg, min("~", "aa"));
^
Main.java:20: error: not a statement
auto i = readln.chomp.split.map!(to!int);
^
Main... |
s948734037 | p00750 | C | // AOJ 1169 The Most Powerful Spell
// 2018.4.17 bal4u
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define QMAX 15000
typedef struct { char s; int t; char lab[405]; } QUE;
QUE que[QMAX]; int qsize;
#define PARENT(i) ((i)>>1)
#define LEFT(i) ((i)<<1)
#define RIGHT(i) (((i)<<1)+1)
void min_heapify(i... | main.c: In function 'dijkstra':
main.c:90:44: error: expected ';' before ')' token
90 | ans = dist[goal][i]);
| ^
| ;
main.c:90:44: error: expected statement before ')' token
|
s046565113 | p00750 | 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
| |
s445848665 | p00750 | C++ | #include <iostream>
#include <complex>
#include <vector>
#include <cstdio>
#include <string>
#include <queue>
using namespace std;
typedef pair<string, int> P;
struct edge{
string str;
int to;
};
vector<edge> G[40];
vector<edge> rG[40];
vector<int> vs;
bool used[40];
int cmp[40];
int n;
void add_edge(int fro... | a.cc: In function 'int succ()':
a.cc:43:5: error: 'memset' was not declared in this scope
43 | memset(used,0,sizeof(used));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <queue>
+++ |+#include <cstring>
... |
s847282590 | p00750 | C++ | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#i... | a.cc: In function 'int main()':
a.cc:65:51: error: no matching function for call to 'std::vector<edge>::push_back(std::vector<edge>&)'
65 | EE[E[i].c - 'a'].push_back(E);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
... |
s076619528 | p00750 | C++ |
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
public class Main{
static InputStream is;
static PrintWriter out;
static String INPUT = "";
public static void... | a.cc:19:9: error: stray '@' in program
19 | @SuppressWarnings("unchecked")
| ^
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.ByteArrayInputStream;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a t... |
s085310886 | p00750 | C++ | #include <iostream>
#include <sstream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <functional>
using namespace std;
typedef pair<string, vector<int> > SI;
string solve(int n, int s, int g, vector<int> &x, vector<int> &y, vector<string> &lab) {
if (s == g) {
return "";
}
map<string... | a.cc: In function 'std::string solve(int, int, int, std::vector<int>&, std::vector<int>&, std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:30:31: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)... |
s584478815 | p00750 | C++ | #include <algorithm>
#include <iostream>
#include <list>
#include <vector>
#include <set>
#include <string>
typedef int node_t;
struct arrow_t {
node_t source;
node_t sink;
std::string label;
};
struct entry_t {
std::string label;
std::set<node_t> nodes;
entry_t() {}
entry_t(const std::s... | a.cc: In function 'int main()':
a.cc:151:25: error: 'arrow' was not declared in this scope; did you mean 'arrows'?
151 | std::cin >> arrow[i].source >> arrow[i].sink >> arrow[i].label;
| ^~~~~
| arrows
|
s818128923 | p00750 | C++ | #include <algorithm>
#include <iostream>
#include <list>
#include <vector>
#include <set>
#include <string>
typedef int node_t;
struct arrow_t {
node_t source;
node_t sink;
std::string label;
};
struct entry_t {
std::string label;
std::set<node_t> nodes;
entry_t() {}
entry_t(const std::s... | a.cc: In function 'int main()':
a.cc:144:27: error: wrong number of template arguments (1, should be 2)
144 | std::array<arrow_t> arrows(a);
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
... |
s030762045 | p00750 | C++ | #include<bits/stdc++.h>
/*
*/
using namespace std;
typedef pair<string, pair<long long int, unsigned long long int>>status;
int main() {
long long int n, a, s, g;
while( cin >> n >> a >> s >> g, n || a || s || g ) {
vector<vector<pair<string, long long int>>>D( n );
for( size_t i = 0; i < a; i++ ) {
long l... | a.cc: In function 'int main()':
a.cc:32:29: error: 'loop' was not declared in this scope
32 | if( loop < now.first ) {
| ^~~~
a.cc:44:53: error: 'loop' was not declared in this scope
44 | if( loop > next.firs... |
s316896773 | p00750 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <queue>
using namespace std;
struct edge {
int s;
int t;
string cost;
edge() {}
edge(int s, int t, string cost) :s(s), t(t), cost(cost) {}
};
int main() {
cin.tie(0); ios::sync_with_stdio(false);
while (1) {
int n, a, s, g;
cin >> n >> a >> s... | a.cc: In function 'int main()':
a.cc:66:17: error: 'sort' was not declared in this scope; did you mean 'short'?
66 | sort(ans.begin(), ans.end());
| ^~~~
| short
|
s317987303 | p00750 | C++ | #include<cstdio>
#include<vector>
#include<queue>
#include<string>
#include<iostream>
using namespace std;
const int INF = 100000000;
typedef pair<int, string> P;
vector<int> to[40];
vector<string> name[40];
int n, a, s, g;
bool used[40];
vector<P> que[2]; // queueとみせかけてvector
string ans;
string temp;
string nil = "... | a.cc: In function 'int main()':
a.cc:124:38: error: a function-definition is not allowed here before '{' token
124 | void push(int j, int x, string plus) {
| ^
a.cc:140:11: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
140 | bool ... |
s034332017 | p00750 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <queue>
using namespace std;
typedef vector< vector< pair<int, string> > > Graph;
class Node{
public:
int pos; string str; int prev;
Node(int pos, string str, int prev) : pos(pos), str(str), prev(prev) {}
bool operator < (const Node &nd) const { ret... | a.cc: In function 'int main()':
a.cc:25:17: error: 'memset' was not declared in this scope
25 | memset(con, false, sizeof(con));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <queue>
... |
s285559776 | p00750 | C++ | #include <iostream>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef pair<string,int> P;
map<int,vector<P> >arr;
int N,S,G;
void bfs(){
set<P>q;
q.insert(make_pair("",S));
for(;!q.empty();){
P p=*q.begin();q.erase(q.begin());
if(p.second==G){co... | a.cc: In function 'int main()':
a.cc:37:17: error: 'memset' was not declared in this scope
37 | memset(r,0,sizeof(r));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <algorithm>
+++ |... |
s281066115 | p00750 | C++ | // ACM-ICPCà\I2010 E. ÅÌô¶
#include <iostream>
#include <string>
#include <vector>
#include <queue>
using namespace std;
typedef vector< vector< pair<int, string> > > Graph;
class Node{
public:
int pos; string str; int prev;
Node(int pos, string str, int prev) : pos(pos), str(str), prev(prev) {}
bool ... | a.cc: In function 'int main()':
a.cc:29:17: error: 'memset' was not declared in this scope
29 | memset(prev, -1, sizeof(prev));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <queue>
... |
s382132647 | p00750 | C++ |
#include <iostream>
#include <utility>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <bitset>
#include <string>
#include <cstdio>
using namespace std;
typedef pair<string,int> spell;
inline int cmp(const string &s1, const string &s2){
return s1.compare( 0, s1.le... | a.cc: In function 'int main()':
a.cc:76:33: error: 'cnt' was not declared in this scope; did you mean 'int'?
76 | int t = cnt & 1;
| ^~~
| int
|
s174766882 | p00750 | C++ | z#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:1:2: error: stray '#' in program
1 | z#include <iostream>
| ^
a.cc:1:1: error: 'z' does not name a type
1 | z#include <iostream>
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/istream:40,
... |
s217272540 | p00750 | C++ | #include <iostream>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
using namespace std;
typedef pair<string, int> P;
multimap <int, string> road[41];
set < P,less<P> > dp;
int reachable[41][41];
main(){
int n,a,s,g,i,j,k;
map<int, string>::iterator it;
while(cin>>n>>a>>s>>g,n){
memset(re... | a.cc:17:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
17 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:21:17: error: 'memset' was not declared in this scope
21 | memset(reachable, 0, sizeof(reachable));
| ^~~~~~
a.cc:6:1: note: '... |
s235754455 | p00751 | C++ | #include<stdio.h>
#include<algorithm>
#include<queue>
#include<string>
#include<set>
#include<vector>
#include<string.h>
using namespace std;
char str[50];
char word[35][30];
vector<string>ans;
struct wolf{
int flag;
int par;
int chi[27];
int dep;
int val;
int fail;
wolf(){
flag=dep=0;
val=-1;
par=-1;
fa... | a.cc: In function 'void dfs(int, std::string)':
a.cc:67:13: error: reference to 'hash' is ambiguous
67 | if(!hash.count(t)){
| ^~~~
In file included from /usr/include/c++/14/bits/stl_bvector.h:65,
from /usr/include/c++/14/vector:67,
from /usr/include/c++/14... |
s765765824 | p00751 | C++ | // ACM-ICPCà\I2010 F. âL¯
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
const int INF = 100000000;
int d;
string mes, cur;
vector<string> piece;
vector<int> connect[30][20];
vector<string> ans;
set<string> mem[43];
int dp[43][43];
int cost... | a.cc: In function 'int getMinedit(std::string, std::string)':
a.cc:33:17: error: 'memcpy' was not declared in this scope
33 | memcpy(cost, newcost, sizeof(cost));
| ^~~~~~
a.cc:8:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cs... |
s003216592 | p00751 | C++ | // ACM-ICPCà\I2010 F. âL¯
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
const int INF = 100000000;
int d;
string mes, cur;
vector<string> piece;
vector<int> connect[30][20];
vector<string> ans;
set<string> mem[43];
int dp[43][43];
int cost... | a.cc: In function 'int getMinedit(std::string, std::string)':
a.cc:33:17: error: 'memcpy' was not declared in this scope
33 | memcpy(cost, newcost, sizeof(cost));
| ^~~~~~
a.cc:8:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cs... |
s102438799 | p00751 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<cstring>
#include<vector>
#include<algorithm>
using namespace std;
#define INF (1<<29)
typedef unsigned __int64 ull;
//#define MOD 1000000003
#define FIND(h) (binary_search(piece.begin(),piece.end(),h))
const int B=103;
vector<ull> piece;
int pLen;
vector<s... | a.cc:9:26: error: expected initializer before 'ull'
9 | typedef unsigned __int64 ull;
| ^~~
a.cc:14:8: error: 'ull' was not declared in this scope
14 | vector<ull> piece;
| ^~~
a.cc:14:11: error: template argument 1 is invalid
14 | vector<ull> piece;
| ... |
s349823614 | p00751 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<cstring>
#include<vector>
#include<algorithm>
using namespace std;
#define INF (1<<29)
typedef unsigned long long ull;
//#define MOD 1000000003
#define FIND(h) (binary_search(piece.begin(),piece.end(),h))
const int B=103;
vector<ull> piece;
int pLen;
vector... | a.cc:17:18: error: initializer-string for 'const char [27]' is too long [-fpermissive]
17 | const char C[27]=".ABCDEFGHIJKLMNOPQRSTUVWXYZ";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'void search(std::string&, int)':
a.cc:81:17: error: no matching function for call to 'std::__cxx11::bas... |
s898671907 | p00752 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,... | a.cc: In function 'int main()':
a.cc:155:36: error: redeclaration of 'std::vector<std::vector<int> > per'
155 | vector<vi> per = { { 0,1 } };
| ^~~
a.cc:154:36: note: 'std::vector<std::vector<int> > per' previously declared here
154 | ... |
s617233978 | p00752 | C++ | #include <iostream>
#include <fstream>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <map>
#include <numeric>
#include <queue>
#include ... | a.cc: In function 'void f(int, int, int*)':
a.cc:140:9: error: jump to label 'fail'
140 | fail:;
| ^~~~
a.cc:131:74: note: from here
131 | if(intersectSS(L(point[i],point[i+1]),m[j]))goto fail;
| ... |
s014042649 | p00752 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <c... | a.cc:69:1: warning: 'typedef' was ignored in this declaration
69 | typedef struct segment{
| ^~~~~~~
a.cc: In function 'P mirror(P&, segment)':
a.cc:90:23: error: cannot bind non-const lvalue reference of type 'P&' {aka 'std::complex<double>&'} to an rvalue of type 'std::complex<double>'
90 | double... |
s901944054 | p00752 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <c... | a.cc:69:1: warning: 'typedef' was ignored in this declaration
69 | typedef struct segment{
| ^~~~~~~
a.cc: In function 'P mirror(P&, segment&)':
a.cc:90:23: error: cannot bind non-const lvalue reference of type 'P&' {aka 'std::complex<double>&'} to an rvalue of type 'std::complex<double>'
90 | doubl... |
s845181084 | p00752 | C++ | #include <iostream>
#include <algorithm>
#include <complex>
#include <vector>
using namespace std;
typedef complex<double> Point;
struct Segment{ Point p1, p2; };
const double EPS = 1e-2;
const double INF = 1e5;
bool equals(double a, double b){
return abs(a-b) < EPS;
}
double dot(Point a, Point b){
return rea... | a.cc:118:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
118 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:123:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
123 | cin >> in.p1.real() >> in.p1.i... |
s490744733 | p00753 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
boolean[] E=new boolean[123456];
for(int a=2;a<123456;a++) E[a]=true;
for(int a=2;a<1000;a++) if(E[a]) for(int b=a*a;b<123456;b+=a) E[b]=false;
while(true){
int n=sc.nextInt();
if(... | Main.java:15: error: cannot find symbol
for(int a=n+1;a<=2*n;i++) if(E[a]) ans++;
^
symbol: variable i
location: class Main
1 error
|
s081969842 | p00753 | Java | import java.util.Scanner;
public class Chebyshevs_Theorem {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while (true) {
int n = scan.nextInt();
if(n==0){
break;
}
sosuu(n);
}
}
pub... | Main.java:3: error: class Chebyshevs_Theorem is public, should be declared in a file named Chebyshevs_Theorem.java
public class Chebyshevs_Theorem {
^
1 error
|
s738371042 | p00753 | Java | import java.util.*;
class Main{
public static void main(String[] args) {
Scanner scn=new Scanner(System.in);
int n;
//List<Integer> dat=new ArrayList<Integer>();
while(true){
int ans=0;
n=scn.nextInt();
if(n==0)break;
for(int i=n+1;i<=2*n;i++){
for(int j=2;j<=i;j++){
if(i%j==0)break;
... | Main.java:28: error: class, interface, enum, or record expected
}
^
1 error
|
s990192788 | p00753 | Java | import java.util.*;
class Main{
public static void main(String[] args) {
Scanner scn=new Scanner(System.in);
int n;
//List<Integer> dat=new ArrayList<Integer>();
while(true){
int ans=0;
n=scn.nextInt();
if(n==0)break;
for(int i=n+1;i<=2*n;i++){
for(int j=2;j<=i;j++){
if(i%j==0)break;
... | Main.java:25: error: cannot find symbol
System.out.println(ans);
^
symbol: variable ans
location: class Main
1 error
|
s895640393 | p00753 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int n = sc.nextInt();
if (n == 0)
break;
int number = n - 1;
for (int k = n + 1; k <= (2 * n) - 1; k++) {
for (int d = 2; d <= n; d++) {
if (k % d... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s344740849 | p00753 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int n = sc.nextInt();
if (n == 0)
break;
int count = 0;
for (int i = n + 1; i <= 2 * n; i++) {
int num = (int) Math.sqrt(i) + 1;
if (i == 2)
num = 2;
int yaku_count = 0;... | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s169281072 | p00753 | Java | import java.util.ArrayList;
import java.util.Scanner;
public class Main{
Scanner sc=new Scanner(System.in);
static final int upperlimit=2*123456;
private void cal(){
ArrayList<Integer> primes=new ArrayList<Integer>();
primes.add(2);
for(int i=3;i<chebyshev.upperlimit;i+=2){
for(int j=0;j<primes.... | Main.java:16: error: cannot find symbol
for(int i=3;i<chebyshev.upperlimit;i+=2){
^
symbol: variable chebyshev
location: class Main
1 error
|
s707530634 | p00753 | Java | import java.io.*;
import java.util.*;
public class icpc2011a {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
while (true) {
int n = sc.nextInt();
int ans = 0;
if (n == 0) {
break;
}
ans = solve(n);
System.out.println(ans);
}
}
publi... | Main.java:4: error: class icpc2011a is public, should be declared in a file named icpc2011a.java
public class icpc2011a {
^
1 error
|
s850223735 | p00753 | Java | import java.util.Arrays;
import java.util.Scanner;
public class A2011 {
public static final int MAX = 123456;
public static void main(String[] args) {
boolean[] is_prime = new boolean[MAX * 2 + 1];
Arrays.fill(is_prime, true);
is_prime[0] = is_prime[1] = false;
for(int i = 0; i <= MAX * 2; i++){
... | Main.java:5: error: class A2011 is public, should be declared in a file named A2011.java
public class A2011 {
^
1 error
|
s917184916 | p00753 | Java | import java.util.Scanner;
import java.util.HashSet;
import java.util.ArrayList;
public class ChebyshevesTheorem {
public static void main(String[] args) {
Scanner stdin = new Scanner(System.in);
while(stdin.hasNext()){
int n = stdin.nextInt();
if (n == 0) break;
System.out.println(primeNumberNums(n));
... | Main.java:5: error: class ChebyshevesTheorem is public, should be declared in a file named ChebyshevesTheorem.java
public class ChebyshevesTheorem {
^
1 error
|
s987555518 | p00753 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc=new Scanner(System.in);
while(true){
int n=sc.nextInt();
if(n==0)
break;
int cnt=0,flag;
for(int i=n+1;i<=2*n;i++){
flag=0;
for(int j=2;j<i;j++){
... | Main.java:5: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.