submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s307068818 | p01271 | C++ | 50 50
%#................................................ ................................................#%
.#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#. .#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#.
.#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#. .#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#.
.#.#..#... | a.cc:2:2: error: stray '#' in program
2 | %#................................................ ................................................#%
| ^
a.cc:2:100: error: stray '#' in program
2 | %#................................................ ................................................#%
| ... |
s189798418 | p01271 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
int const dxL[] = {-1,0,1,0};
int const dxR[] = {1,0,-1,0};
int const dy[] = {0,-1,0,1};
typedef pair<int, int> Pii;
#define X first
#define Y second
int const INF = 1<<28;
int W, H;
char grL[51][51], grR[51][51];
bool us... | a.cc: In function 'int main()':
a.cc:63:5: error: 'memset' was not declared in this scope
63 | memset(used, false, sizeof used);
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <queue>
+++ |+#include <cstring... |
s517166235 | p01271 | C++ | #include<iostream>
#include<queue>
#include<algorithm>
using namespace std;
typedef pair< int, int > Pi;
bool used[50][50][50][50];
char masL[50][50], masR[50][50];
int W, H;
Pi RinS, LenS; //スタート
const int dy[] = { 1, 0, -1, 0}, dx[] = { 0, 1, 0, -1};
bool isover(int y, int x){
return y < 0 || y >= H || x < 0 || x... | a.cc: In function 'int main()':
a.cc:54:5: error: 'memset' was not declared in this scope
54 | memset( used, false, sizeof(used));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cs... |
s723651999 | p01271 | C++ | #include <queue>
#include <tuple>
#include <string>
#include <iostream>
using namespace std;
const int dx1[4] = { 0, 1, 0, -1 };
const int dy1[4] = { -1, 0, 1, 0 };
const int dx2[4] = { 0, -1, 0, 1 };
const int dy2[4] = { -1, 0, 1, 0 };
int H, W; string L[50], R[50];
bool used[50][50][50][50];
bool over(int x, int... | a.cc: In function 'int main()':
a.cc:84:17: error: 'memset' was not declared in this scope
84 | memset(used, false, sizeof(used));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <iostre... |
s441411288 | p01271 | C++ | #include <iostream>
#include <queue>
#include <set>
#define N 50
using namespace std;
void bfs();
typedef struct dat{
int y1,x1,y2,x2;
} d;
int w,h,sy1,sx1,sy2,sx2,gy1,gx1,gy2,gx2,ans;
string r1[N],r2[N];
set<d> visited;
int main(){
while(1){
cin>>w>>h;
if(!w&&!h) break;
for(int i=0;i<h;i++) cin>>r1... | In file included from /usr/include/c++/14/string:49,
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... |
s255138313 | p01271 | C++ | #include <iostream>
#include <queue>
#include <set>
#define N 50
#define y1 first.first
#define x1 first.second
#define y2 second.first
#define x2 second.second
using namespace std;
void bfs();
pair<int,int> P;
pair<P,P> P1;
int w,h,sy1,sx1,sy2,sx2,gy1,gx1,gy2,gx2,ans;
string r1[N],r2[N];
set<P1> visited;
int main()... | a.cc:13:9: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
13 | pair<P,P> P1;
| ^
a.cc:13:9: note: expected a type, got 'P'
a.cc:13:9: error: type/value mismatch at argument 2 in template parameter list for 'template<class _T1,... |
s708730746 | p01271 | C++ | #include <iostream>
#include <queue>
#include <set>
#define N 50
#define y1 first.first
#define x1 first.second
#define y2 second.first
#define x2 second.second
using namespace std;
typedef pair<int,int> P;
typedef pair<P,P> P1;
void bfs();
int w,h,sy1,sx1,sy2,sx2,gy1,gx1,gy2,gx2,ans;
string r1[N],r2[N];
set<P1> visi... | a.cc: In function 'void bfs()':
a.cc:42:28: error: no matching function for call to 'std::pair<std::pair<int, int>, std::pair<int, int> >::pair(<brace-enclosed initializer list>)'
42 | P1 k=(P1){sy1,sx1,sy2,sx2};
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,... |
s493651366 | p01271 | C++ | #include <iostream>
#include <queue>
#include <set>
#define N 52
#define y1 first.first
#define x1 first.second
#define y2 second.first
#define x2 second.second
using namespace std;
typedef pair<int,int> P;
typedef pair<P,P> P1;
void bfs();
int w,h,sy1,sx1,sy2,sx2,gy1,gx1,gy2,gx2,ans;
string r1[N],r2[N];
set<P1> visi... | a.cc: In function 'int main()':
a.cc:37:8: error: expected unqualified-id before '.' token
37 | set.clear();
| ^
a.cc: In function 'void bfs()':
a.cc:45:29: error: no matching function for call to 'std::pair<int, int>::pair(int&)'
45 | P1 k=make_pair((P)(sy1,sx1),(P)(sy2,sx2));
| ... |
s623365630 | p01271 | C++ | /*** ???????????? ***/
#include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)
struct State{
int xL, yL, xR, yR;
};
int main(){
int w, h;
int dx[4]={0, 1, 0, -1}; // ????????????
int dy[4]={-1, 0, 1, 0};
while(cin>>w>>h, w||h){
State st;
char Len[51][51];
char Rin[51]... | a.cc: In function 'int main()':
a.cc:51:28: error: 'Lin' was not declared in this scope; did you mean 'Rin'?
51 | if(Lin[yl][xl]=='%' && Ren[yr][xr]=='%'){
| ^~~
| Rin
a.cc:51:48: error: 'Ren' was not declared in this scope; di... |
s264802755 | p01271 | C++ | // SampleMC1.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include "stdafx.h"
#include<iostream>
#include<queue>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)
bool hist[51][51][51][51];
struct State {
int xL, yL, xR, yR;
};
int main() {
int ... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s369370831 | p01271 | C++ | #include<iostream>
#include<queue>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)
bool hist[51][51][51][51];
struct State {
int xL, yL, xR, yR;
};
int main() {
int w, h;
int dx[4] = { 0, 1, 0, -1 }; // ????????????
int dy[4] = { -1, 0, 1, 0 };
while (cin >> w >> h, w || h) {
State st;
ch... | a.cc: In function 'int main()':
a.cc:24:17: error: 'memset' was not declared in this scope
24 | memset(hist, false, sizeof hist);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<queue>
... |
s720597039 | p01271 | C++ | // SampleMC1.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include "stdafx.h"
#include<iostream>
#include<queue>
#include<stack>
#include<string.h>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)
bool hist[51][51][51][51];
struct State {
int xL,... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s132629194 | p01271 | C++ | include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define mk make_pair
using namespace std;
string s1[50],s2[50];
int dx1[]={1,-1,0,0,},dy1[]={0,0,1,-1};
int dx2[]={-1,1,0,0,},dy2[]={0,0,1,-1};
int w,h,gx1,gx2,gy1,gy2;
set<pair<pair<int,int>,pair<int,int> > >s;
bool dfs(int x1,int y1,int x2,int y2){
if(x1==g... | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc:5:1: error: 'string' does not name a type
5 | string s1[50],s2[50];
| ^~~~~~
a.cc:9:1: error: 'set' does not name a type
9 | set<pair<pair<int,int>,pair<int,int> > >s;
| ^~~
a.cc: In function 'bool df... |
s674144814 | p01271 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define mk make_pair
using namespace std;
string s1[50],s2[50];
int dx1[]={1,-1,0,0,},dy1[]={0,0,1,-1};
int dx2[]={-1,1,0,0,},dy2[]={0,0,1,-1};
int w,h,gx1,gx2,gy1,gy2;
unordered_set<int>s;
bool bfs(int x1,int y1,int x2,int y2){
queue<int>q;
q.push(x1+y1*1... | a.cc: In function 'bool bfs(int, int, int, int)':
a.cc:28:49: error: 'gy42' was not declared in this scope; did you mean 'gy2'?
28 | if(!((x3!=gx1||y3!=gy1)&&x4==gx2&&y4==gy42))
| ^~~~
| gy2
|
s923943900 | p01271 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define fi first
#define se second
#define mk make_pair
using namespace std;
string s1[50],s2[50];
int dx1[]={1,-1,0,0,},dy1[]={0,0,1,-1};
int dx2[]={-1,1,0,0,},dy2[]={0,0,1,-1};
int w,h,gx1,gx2,gy1,gy2;
unordered_set<pair<pair<int,int>,pair<int,int> > >s;
que... | a.cc:11:51: error: use of deleted function 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::pair<std::pair<int, int>, std::pair<int, int> >; _Hash = std::hash<std::pair<std::pair<int, int>, std::pair<int, int> > >; _Pred = std::equal_to<std::pair<std::pair<int, int>, std::pair<int,... |
s850666374 | p01271 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define fi first
#define se second
#define mk make_pair
using namespace std;
string s1[50],s2[50];
int dx1[]={1,-1,0,0,},dy1[]={0,0,1,-1};
int dx2[]={-1,1,0,0,},dy2[]={0,0,1,-1};
int w,h,gx1,gx2,gy1,gy2;
unordered_set<pair<pair<int,int>,pair<int,int> > >s;
que... | a.cc:11:51: error: use of deleted function 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::pair<std::pair<int, int>, std::pair<int, int> >; _Hash = std::hash<std::pair<std::pair<int, int>, std::pair<int, int> > >; _Pred = std::equal_to<std::pair<std::pair<int, int>, std::pair<int,... |
s762677776 | p01271 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> Coor;
typedef pair<Coor, Coor> Coor;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {-1, 0, 1, 0};
int H;
int W;
int sty[2];
int stx[2];
int y[2];
int x[2];
char field[2][50][50];
bool dp[50][50][50][50];
bool WithinRange(int y, int x) {
if (y... | a.cc:5:26: error: conflicting declaration 'typedef struct std::pair<std::pair<int, int>, std::pair<int, int> > Coor'
5 | typedef pair<Coor, Coor> Coor;
| ^~~~
a.cc:4:24: note: previous declaration as 'typedef struct std::pair<int, int> Coor'
4 | typedef pair<int, int> Coor;
... |
s177624680 | p01271 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
char fieldL[51][51];
char fieldR[51][51];
bool checked[51][51][51][51];
int w, h;
bool dfs(int ly, int lx, int ry, int rx) {
if (fieldL[ly][lx] == fieldR[ry][rx] && fieldL[ly][lx] == '%') {
return true;
}
if (checked[ly][lx][... | a.cc: In function 'int main()':
a.cc:78:5: error: 'memset' was not declared in this scope
78 | memset(checked, false, sizeof(checked));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#inclu... |
s058780006 | p01271 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <array>
#include <queue>
#include <array>
#include <stack>
enum PassageType{
FREE, WALL, SEARCHED, GOAL,
};
bool isSearched[50][50][50][50] = {false};
struct Point {
Point() { x = 0; y = 0; };
Point(int x, int y) {
this->x = x;
this->y = y;
};
... | a.cc: In function 'int main()':
a.cc:28:17: error: 'memset' was not declared in this scope
28 | memset(isSearched, false, sizeof(bool) * 50 * 50 * 50 * 50);
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>... |
s046110134 | p01271 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <array>
#include <queue>
#include <array>
#include <stack>
enum PassageType{
FREE, WALL, SEARCHED, GOAL,
};
bool isSearched[50][50][50][50] = {false};
struct Point {
Point() { x = 0; y = 0; };
Point(int x, int y) {
this->x = x;
this->y = y;
};
... | a.cc: In function 'int main()':
a.cc:28:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
28 | std::memset(isSearched, false, sizeof(bool) * 50 * 50 * 50 * 50);
| ^~~~~~
| wmemset
|
s017080525 | p01271 | C++ | from collections import deque
while True:
w,h=map(int,input().split(" "))
def isrange(p):
return 0<=p[0] and p[0]<h and 0<=p[1] and p[1]<w
if w==0: break
rl=[[str()] for i in range(h)]
rr=[[str()] for i in range(h)]
for i in range(h):
rl[i],rr[i]=input().split(" ")
q = deque(... | a.cc:1:1: error: 'from' does not name a type
1 | from collections import deque
| ^~~~
|
s992397708 | p01271 | C++ | fffff
| a.cc:1:1: error: 'fffff' does not name a type
1 | fffff
| ^~~~~
|
s888991300 | p01271 | C++ | #include <iostream>
#include <queue>
#include <fstream>
#include <stack>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define rREP(i, k, n) for (int i = (int)(n)-1; i >=... | a.cc: In function 'int main()':
a.cc:50:9: error: 'memset' was not declared in this scope
50 | memset(u,0,sizeof(u));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <stack>
+++ |+#include <cstring>
... |
s886938737 | p01271 | C++ | #include<iostream>
#include<queue>
#include<string>
#define rep(i,n) for(int i=0;i<n;i++)
#define ck(a,b) (0<=(a)&&(a)<b)
using namespace std;
int dx[]={-1,1,0,0},dy[]={0,0,-1,1};
struct S{
int lx,ly,rx,ry;
S(int a,int b,int c,int d):lx(a),ly(b),rx(c),ry(d){}
};
bool V[50][50][50][50];
int main(){
int w,h;
while(ci... | a.cc: In function 'int main()':
a.cc:24:19: error: 'class std::queue<S>' has no member named 'push_back'
24 | F.push_back(S(lx,ly,rx,ry)); V[ly][lx][ry][rx]=1;
| ^~~~~~~~~
a.cc:29:42: error: no match for 'operator[]' (operand types are 'std::queue<S>' and 'int')
29 | ... |
s414504464 | p01271 | C++ | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include... | a.cc:40:1: error: expected initializer before 'string'
40 | string ans;
| ^~~~~~
a.cc:42:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
42 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:46:35: error: 'rr' was not declared in this scope; did you mean 'lr'?
46 |... |
s745243720 | p01272 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define X real()
#define Y imag()
typedef long double D;
typedef complex<D> P;
struct L{P a, b;};
typedef vector<P> Pol;
const D EPS = 1e-8;
int sig(D a, D b = 0) {return a < b - EPS ? -1 : a > b + EPS ? 1 : 0;}
bool ... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_... |
s692411541 | p01272 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define X real()
#define Y imag()
typedef double D;
typedef complex<D> P;
struct L{P a, b;};
typedef vector<P> Pol;
const D EPS = 1e-8;
int sig(D a, D b = 0) {return a < b - EPS ? -1 : a > b + EPS ? 1 : 0;}
bool near(... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_... |
s174917565 | p01272 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define X real()
#define Y imag()
typedef long double D;
typedef complex<D> P;
struct L{P a, b;};
typedef vector<P> Pol;
const D EPS = 1e-8;
int sig(D a, D b = 0) {return a < b - EPS ? -1 : a > b + EPS ? 1 : 0;}
bool ... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_... |
s190128482 | p01272 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define X real()
#define Y imag()
typedef long double D;
typedef complex<D> P;
struct L{P a, b;};
typedef vector<P> Pol;
const D EPS = 1e-8;
int sig(D a, D b = 0) {return a < b - EPS ? -1 : a > b + EPS ? 1 : 0;}
bool ... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_... |
s568354346 | p01272 | C++ | #include<cstdio>
#include<complex>
#include<vector>
#include<cmath>
#include<iostream>
#include<string>
#include<climits>
#include<algorithm>
using namespace std;
//FILE *fp=fopen("ShoreErosion_visu2.htm","w");
FILE *fp=stderr;
typedef long double Real;
#define mnan (nanl)
typedef complex<Real> Point;
typedef comple... | a.cc: In function 'Point iLL(Line, Line)':
a.cc:48:86: error: no matching function for call to 'std::complex<long double>::complex(long double (&)(const char*) noexcept, long double (&)(const char*) noexcept)'
48 | if(sgn(crP(l1.second-l1.first,l2.second-l2.first))==0) return Point(mnan,mnan);
| ... |
s871562262 | p01273 | Java | import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
import java.io.*;
import java.util.*;
public class Main {
void run() {
while (true) {
int N = readInt();
int M = readInt();
if (N == 0 && M == 0) break;
boolean[] virus = new boolean[N];
... | Main.java:1: error: package com.sun.xml.internal.bind.v2.runtime.reflect does not exist
import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
^
1 error
|
s291405213 | p01273 | Java | import java.util.Scanner;
public class AOJ_2155
{
private class Data
{
long t;
int s,d;
Data(long t,int s,int d)
{
this.t = t;
this.s = s;
this.d = d;
}
}
public void sort(Data[] datas)
{
for(int i = 0;i < datas.length - 1;i++)
{
for(int j = i + 1;j < datas.length;j++)
{
if(datas[i... | Main.java:2: error: class AOJ_2155 is public, should be declared in a file named AOJ_2155.java
public class AOJ_2155
^
1 error
|
s000303097 | p01273 | Java | import java.util.Scanner;
public class Main
{
private class Data
{
long t;
int s,d;
Data(long t,int s,int d)
{
this.t = t;
this.s = s;
this.d = d;
}
}
public void sort(Data[] datas)
{
for(int i = 0;i < datas.length - 1;i++)
{
for(int j = i + 1;j < datas.length;j++)
{
if(datas[i].t ... | Main.java:65: error: cannot find symbol
new AOJ_2155().solve();
^
symbol: class AOJ_2155
location: class Main
1 error
|
s661909247 | p01273 | C++ | #include <cstdio>
#include <vector>
using namespace std;
struct dts{
int t;
int s;
int d;
};
int main(void){
int N,M,i,cnt;
while(1){
scanf("%d",&N);
scanf("%d",&M);
if(!N && !M){break;}
int pcs[N];
vector<dts> datas;
for(i=0;i<N;i++){pcs[i]=0;}
... | a.cc: In function 'int main()':
a.cc:28:9: error: 'sort' was not declared in this scope; did you mean 'short'?
28 | sort(datas.begin(),datas.end(),[](const dts& x,const dts& y){return x.t < y.t;});
| ^~~~
| short
|
s211138129 | p01273 | C++ | #include <cstdio>
#include <vector>
using namespace std;
struct dts{
int t;
int s;
int d;
};
int main(void){
int N,M,i,cnt;
while(1){
scanf("%d",&N);
scanf("%d",&M);
if(!N && !M){break;}
int pcs[N];
vector<dts> datas;
for(i=0;i<N;i++){pcs[i]=0;}
... | a.cc: In function 'int main()':
a.cc:28:9: error: 'sort' was not declared in this scope; did you mean 'short'?
28 | sort(datas.begin(),datas.end(),[](const dts& x,const dts& y){return x.t < y.t;});
| ^~~~
| short
|
s996810884 | p01273 | C++ | #include <iostream>
#include <vector>
using namespace std;
struct edge{
int t;
int from;
int to;
edge(){};
edge(int t,int from,int to):t(t),from(from),to(to){};
bool operator<(const edge& other) const {
return t < other.t;
}
};
int main(){
int n,m;
while(cin >> n >> m && n != 0){
vector<edge> vec;
... | a.cc: In function 'int main()':
a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(vec.begin(),vec.end());
| ^~~~
| short
|
s476492096 | p01273 | C++ | #include <iostream>
#include <vector>
using namespace std;
struct edge{
int t;
int from;
int to;
edge(){};
edge(int t,int from,int to):t(t),from(from),to(to){};
bool operator<(const edge& other) const {
return t < other.t;
}
};
int main(){
int n,m;
while(cin >> n >> m && n != 0){
vector<edge> vec;
... | a.cc: In function 'int main()':
a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(vec.begin(),vec.end());
| ^~~~
| short
|
s928827890 | p01273 | C++ | #include <iostream>
#include <vector>
using namespace std;
struct edge{
int t;
int from;
int to;
edge(){};
edge(int t,int from,int to):t(t),from(from),to(to){};
bool operator<(const edge& other) const {
return t < other.t;
}
};
int main(){
int n,m;
while(cin >> n >> m && n != 0){
vector<edge> vec;
... | a.cc: In function 'int main()':
a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(vec.begin(),vec.end());
| ^~~~
| short
|
s755966185 | p01273 | C++ | #include<iostream>
using namespace std;
struct log{
int T,s,d;
bool operator<(const log &a)const{
return T<a.T;
}
};
const int MAX_N=30000;
int parent[MAX_N];
int depth[MAX_N];
void init(int n){
for(int i=0;i<n;i++){
parent[i]=i;
depth[i]=0;
}
}
int find(int x){
if(parent[x]==x){
return x;... | a.cc: In function 'int main()':
a.cc:51:5: error: 'sort' was not declared in this scope; did you mean 'short'?
51 | sort(l,l+m);
| ^~~~
| short
|
s566325213 | p01273 | C++ | import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
public class Main {
int[] par;
int count;
void union(int x, int y) {
x = root(x);
y = root(y);
par[x] = y;
}
boolean find(int x, int y) {
return root(x) == root(y);
}
int root(int x) {
if (par[x] == x) ret... | a.cc:33:17: error: stray '@' in program
33 | @Override
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
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 | i... |
s789095661 | p01273 | C++ | #include<iostream>
using namespace std;
struct Data{
int t,s,d;
bool operator<(const Data& data)const{
if(data.t != t)return t < data.t;
if(data.s != s)return s < data.s;
return d < data.d;
}
};
int main(){
int N,M;
while(1){
cin >>N>>M;
if(N==0 && M==0)break;
Data ... | a.cc: In function 'int main()':
a.cc:29:5: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(data,data+M);
| ^~~~
| short
|
s888135380 | p01273 | C++ | #include<iostream>
using namespace std;
struct Data{
int t,s,d;
bool operator<(const Data& data)const{
if(data.t != t)return t < data.t;
if(data.s != s)return s < data.s;
return d < data.d;
}
};
int main(){
int N,M;
while(1){
cin >>N>>M;
if(N==0 && M==0)break;
Data ... | a.cc: In function 'int main()':
a.cc:29:5: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(data,data+M);
| ^~~~
| short
|
s341031889 | p01273 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<functional>
#include<map>
#define p pair<int,int>
#define P pair<int,p>
using namespace std;
bool c[20000];
int main() {
int a, b;
while (cin >> a >> b, a | b) {
memset(c, false, sizeof(... | a.cc: In function 'int main()':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset(c, false, sizeof(c));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include<map>
+++ |... |
s553665471 | p01273 | C++ | #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
long long n,m;
while(cin>>n>>m,n){
vector<pair<int,pair<int,int> > >v;
pair<int,pair<int,int> >p;
long long a[20001]={0},t,s=0;
a[1]=1;
r(i,m){
cin>>p.first>>p.second.first>>p.second.second;
v.pushback(p);
... | a.cc: In function 'int main()':
a.cc:13:27: error: 'class std::vector<std::pair<int, std::pair<int, int> > >' has no member named 'pushback'; did you mean 'push_back'?
13 | v.pushback(p);
| ^~~~~~~~
| push_back
|
s775434040 | p01273 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M, t, s, d, ans;
vector< vector<int> > packets;
while (cin >> N >> M, N) {
vector<bool> infected(N, false);
infected[0] = true;
for (int i = 0; i < M; ++i) {
cin >> t >> s >> d;
packets.push_back({t, s-1, d-1});... | a.cc: In function 'int main()':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(packets.begin(), packets.end());
| ^~~~
| short
|
s696236053 | p01273 | C++ | #include<iostream>
#include<map>
#include<algorithm>
#define M 20000
#define N 20001
using namespace std;
struct data{
int t,s,d;
bool operator<(const data &c){
return t < c.t;
}
};
int main(){
while(true){
int n,m;
int ans=0;
bool infected[N]={false,};
data datas[M];
scanf("%d%d", &n, &m);
if(n==0&&m... | a.cc: In function 'int main()':
a.cc:18:17: error: reference to 'data' is ambiguous
18 | data datas[M];
| ^~~~
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/... |
s357941700 | p01273 | C++ | #include<iostream>
#include<vector>
using namespace std;main(){for(int N,M,i;cin>>N>>M,N;cout<<N<<endl){vector<int>v(N+1),s(M+1),d(M+1);for(i=0;i++<M;cin>>s[N]>>d[N])cin>>N;v[1]=N=1;for(i=0;i++<M;)if(v[s[i]]){v[d[i]]=1;v[d[i]]||N++;} | a.cc:3:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | using namespace std;main(){for(int N,M,i;cin>>N>>M,N;cout<<N<<endl){vector<int>v(N+1),s(M+1),d(M+1);for(i=0;i++<M;cin>>s[N]>>d[N])cin>>N;v[1]=N=1;for(i=0;i++<M;)if(v[s[i]]){v[d[i]]=1;v[d[i]]||N++;}
| ... |
s034985564 | p01273 | C++ | #include<iostream>
#include<vector>
using namespace std;main(){for(int N,M,i;cin>>N>>M,N;cout<<N<<endl){vector<int>v(N+1),s(M+1),d(M+1);for(i=0;i++<M;cin>>s[N]>>d[N])cin>>N;v[1]=N=1;for(i=0;i++<M;)if(v[s[i]]){v[d[i]]=1;v[d[i]]||N++;}} | a.cc:3:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | using namespace std;main(){for(int N,M,i;cin>>N>>M,N;cout<<N<<endl){vector<int>v(N+1),s(M+1),d(M+1);for(i=0;i++<M;cin>>s[N]>>d[N])cin>>N;v[1]=N=1;for(i=0;i++<M;)if(v[s[i]]){v[d[i]]=1;v[d[i]]||N++;}}
| ... |
s763566466 | p01273 | C++ | #include <iostream>
#include <cstring>
#include <algorithm>
#include <utility>
#include <vector>
using namespace std;
vector<pair<int, pair<int , int>>> l;
int v[20010];
int n, m, ans;
int main(void){
int i;
pair<int, pair<int, int>> p;
while( cin >> n >> m, n){
ans = 0;
memset(l, 0, sizeof(l));
memset(v, ... | a.cc: In function 'int main()':
a.cc:19:24: error: cannot convert 'std::vector<std::pair<int, std::pair<int, int> > >' to 'void*'
19 | memset(l, 0, sizeof(l));
| ^
| |
| std::vector<std::pair<int, std::pair<int, in... |
s589587757 | p01273 | C++ | #include <iostream>
#include <cstring>
#include <algorithm>
#include <utility>
#include <vector>
using namespace std;
vector<pair<int, pair<int , int> > > l;
int v[20010];
int n, m, ans;
int main(void){
int i;
pair<int, pair<int, int>> p;
while( cin >> n >> m, n){
ans = 0;
memset(l, 0, sizeof(l));
memset(v... | a.cc: In function 'int main()':
a.cc:19:24: error: cannot convert 'std::vector<std::pair<int, std::pair<int, int> > >' to 'void*'
19 | memset(l, 0, sizeof(l));
| ^
| |
| std::vector<std::pair<int, std::pair<int, in... |
s282378858 | p01273 | C++ | #include <iostream>
#include <cstring>
#include <algorithm>
#include <utility>
#include <vector>
using namespace std;
vector<pair<int, pair<int , int> > > l;
int v[20010];
int n, m, ans;
int main(void){
int i;
pair<int, pair<int, int> > p;
while( cin >> n >> m, n){
ans = 0;
memset(l, 0, sizeof(l));
memset(... | a.cc: In function 'int main()':
a.cc:19:24: error: cannot convert 'std::vector<std::pair<int, std::pair<int, int> > >' to 'void*'
19 | memset(l, 0, sizeof(l));
| ^
| |
| std::vector<std::pair<int, std::pair<int, in... |
s769027998 | p01273 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
typedef pair<int , pair<int, int> > edge;
int main(){
int n, m;
while(cin >> n >> m, (n||m)){
vector<edge> vc;
int t, s, d;
for(int i=0; i<m; ++i){
cin>>t>>s>>d;
vc.push_back(mak... | a.cc: In function 'int main()':
a.cc:22:67: error: expected ')' before ';' token
22 | vc.push_back(make_pair(t, make_pair(s, d));
| ~ ^
| )
|
s344810645 | p01273 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
struct A{
int t,s,d;
A(int t,int s,int d):t(t),s(s),d(d){}
bool operator<(const A &a)const{return t<a.t;}
};
bool infected[20000];
int main(){
int n,m;
while(cin>>n>>m,n||m){
vector<A> v;
v.rese... | a.cc: In function 'int main()':
a.cc:19:17: error: 'memset' was not declared in this scope
19 | memset(infected,false,sizeof(infected));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<a... |
s630260565 | p01274 | C++ | (allDP[i] == INF) {
continue;
}
int cost = allDP[i];
for(auto itr = hps.begin(); itr != hps.end(); itr++) {
if(*itr - i > 0) {
cost += singleDP[*itr - i];
}
}
answer = min(answer, cost);
... | a.cc:1:8: error: 'i' was not declared in this scope
1 | (allDP[i] == INF) {
| ^
a.cc:1:10: error: expected ')' before '==' token
1 | (allDP[i] == INF) {
| ~ ^~~
| )
a.cc:5:24: error: 'allDP' was not declared in this scope
5 | int cost = allDP[i];
| ... |
s050494523 | p01274 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <string>
#include <iostream>
#define INF 1e8
using namespace std;
int n,m;
int hp[101];
int dp[2][100001];
int mp[101],t[101],d[101];
int main(void){
while(1){
scanf("%d",&n);
if(n==0)break;
for(int i=0;i<n;i++){
scanf("%d",... | a.cc: In function 'int main()':
a.cc:51:52: error: no matching function for call to 'min(int, double)'
51 | if(hp[j]>i)cost=min(cost+dp[0][hp[j]-i],INF);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vect... |
s132648158 | p01274 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int multi[100010], single[100010], hp[110];
int main(){
int N;
while (cin >> N && N){
for (int i = 0; i < 100010; i++){
multi[i] = 1e9; single[i] = 1e9;
}
????????????????????????multi[0]=0;single[0]=0;
for (int i = 0; i < N; i++... | a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '?' token
15 | ????????????????????????multi[0]=0;single[0]=0;
| ^
a.cc:15:2: error: expected primary-expression before '?' token
15 | ????????????????????????multi[0]=0;single[0]=0;
| ^
a.cc:15:3: error: expected pr... |
s927177911 | p01274 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
#define rep(i,n) REP(i, 0, n)
typedef pair<int, int> pint;//first : MP, second : Damage
void set_cost(vector<int>& cost, const vector<pint>& attack){
cost[0] = 0;... | a.cc: In function 'int main()':
a.cc:51:22: error: no matching function for call to 'min(int&, ll&)'
51 | ans = min(sum, ans);
| ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s050447093 | p01274 | C++ | #include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int hp[100];
int mp[100];
string target[100];
int damage[100];
int dp1[2][100010], dp2[2][100010];
int main(){
int n, m;
while(cin >> n, n){
for(int i = 0; i < n; i++) cin >> hp[i];
cin >> m;
for(int i = 0; i < m; i++... | a.cc: In function 'int main()':
a.cc:31:40: error: expected ';' before 'dp2'
31 | dp1[i%2][j] = dp1[(i-1)%2][j]
| ^
| ;
32 | dp2[i%2][j] = dp2[(i-1)%2][j];
| ~~~ ... |
s693798946 | p01274 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(void) {
char str[20];
int t[110];
int p[110];
int q[110];
int c[110];
int dp[2][110000];
int a;
while(cin >> a && a) { //N(??¢?????????????????°)???????????????
//N???????????¢???????????????HP(??????)??... | a.cc:40:121: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
40 | dp[t[i]][min(109999,j+q[i])]=min(???dp[t[i]][min(109999,???j+q[i])],???dp[t[i]][j]+p[i]???);
a.cc:61:43: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
61 | ... |
s829797152 | p01274 | C++ | #include<string>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i, n) for ( int i = 0; i < (int)n; i++)
#define NMAX 100
#define MAX 1000000
#define INFTY (1<<21)
void setTable(int maxv, pair<int, int> v[NMAX], int vs, int T[MAX+1]){
rep(i, maxv+1) T[i] = INFTY;
T[0] = 0;
rep(i, vs... | a.cc:22:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
22 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:28:12: error: 'cin' was not declared in this scope
28 | while( cin >> n && n ){
| ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostrea... |
s133204559 | p01274 | C++ | #include<iostream>
#include<algorithm>
#define M 100
#define N 100
#define SINGLE 1
#define ALL 2
#define INFTY 1<<30
using namespace std;
struct magic{
int mp;
int type;
int damage;
bool operator<(const magic &m)const{
return mp<m.mp;
}
};
void solve(int n, int hp[N], int m, magic mag[M], int now, int &ans){
b... | a.cc: In function 'int main()':
a.cc:74:28: error: 'strcmp' was not declared in this scope
74 | if(strcmp(type,"All")==0)mag[magsz].type=ALL;
| ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstr... |
s840173533 | p01274 | C++ | #include <iostream>
#include <string>
#include <queue>
using namespace std;
class Magic{
public:
string name;
int mp;
string target;
int damage;
};
class Monster{
public:
bool live;
int hp;
bool operator<(const Monster &s)const{
return hp<s.hp;
}
};
int n;
Monster mons[100];
int m;
Magic magic[10... | a.cc:27:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
27 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:46:7: error: 'sort' was not declared in this scope; did you mean 'short'?
46 | sort(mons, mons+n);
| ^~~~
| short
a.cc:47:7: error: 'r... |
s810071804 | p01274 | C++ | #include <iostream>
#include <string>
using namespace std;
class Magic{
public:
string name;
int mp;
string target;
int damage;
};
class Monster{
public:
bool live;
int hp;
bool operator<(const Monster &s)const{
return hp<s.hp;
}
};
int n;
Monster mons[100];
int m;
Magic magic[100];
main(){
whi... | a.cc:26:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
26 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:45:7: error: 'sort' was not declared in this scope; did you mean 'short'?
45 | sort(mons, mons+n);
| ^~~~
| short
a.cc:46:7: error: 'r... |
s761352910 | p01274 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <fstream>
using namespace std;
struct Magic{
string name;
int mp;
bool isAll;
int dmg;
};
int n;
int hps[101];
int m;
Magic magics[101];
const ll INF=100000000000000LL;
// SÌÉ é_[Wð^¦éÌÉKv... | a.cc:22:7: error: 'll' does not name a type
22 | const ll INF=100000000000000LL;
| ^~
a.cc:25:1: error: 'll' does not name a type
25 | ll dp[2][200001];
| ^~
a.cc:27:1: error: 'll' does not name a type
27 | ll dp2[2][200001];
| ^~
a.cc: In function 'int main()':
a.cc:51:17: error: 'll' ... |
s894127146 | p01274 | C++ | 3
8000 15000 30000
3
Flare 45 Single 8000
Meteor 62 All 6000
Ultimate 80 All 9999
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s708068535 | p01274 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
int n,m,d,h,i,j,r,s;
string str;
for(;cin>>n,n;cout<<r<<endl){
vector<int>monster(n);
for(h=i=0;i<n;i++){
cin>>monster[i];
if(h<monster[i])h=monster[i];
}
vector<pair<int,int> >_all,_single;
vector<int>all(h+1),... | a.cc: In function 'int main()':
a.cc:20:37: error: invalid types 'int[int]' for array subscript
20 | if(s[0]=='A')_all.push_back(make_pair(m,d));
| ^
|
s950314102 | p01274 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 100009
using namespace std;
int dp1[10009];
int dp2[10006];
char s[25];
int num[105];
int main()
{
int n,m,x,y;
while(scanf("%d",&n)&&n!=0)
{
int ma=-1;
for(int i=0; i<n; i++)
scanf("%d",&num[i]);
sort... | a.cc: In function 'int main()':
a.cc:43:25: error: expected primary-expression before 'long'
43 | long long ans=1(long long)<<62,sum;
| ^~~~
a.cc:43:34: error: expression cannot be used as a function
43 | long long ans=1(long long)<<62,sum;
| ... |
s890981833 | p01275 | C++ | #include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>
using namespace std;
#define int long long
#define rep(i,n) for(int i = 0; i < (n); i++)
#define INF ((long long)1e18)
#define MOD ((int)10)
#define endl "\n"
#define yn(f) ((f)?"Yes":"No")
#define YN(f) ((f)?"... | a.cc: In function 'long long int solve(std::vector<long long int>)':
a.cc:25:30: error: expected ';' before 'break'
25 | b = i
| ^
| ;
26 | break;
| ~~~~~
a.cc: In f... |
s987870259 | p01275 | C++ | #include <iostream>
#include <iomanip>
#include <sstream>
#include <vector>
#include <string>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <functional>
#include <iterator>
#include <limits>
#include <nume... | a.cc: In function 'int main()':
a.cc:94:34: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type)'
94 | res = min( res, SZ( ds ) - count_if( ALL( csum ), []( const int x ){ return x % 10 == 0; }... |
s112569742 | p01275 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
typedef long long ll;
typedef pair<int,int> p... | a.cc: In function 'void slove(int, int*)':
a.cc:52:53: error: invalid use of void expression
52 | ans = min(ans, slove(cnt, D));
| ~~~~~^~~~~~~~
a.cc:59:53: error: invalid use of void expression
59 | ... |
s578020099 | p01275 | C++ | #include <bits/stdc++.h>
#define rep(n) for(int i=0;i<n;i++)
#define repp(j, n) for(int j=0;j<n;j++)
#define reppp(i, m, n) for(int i=m;i<n;i++)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define debug(x) cerr << #x << ": " << x << endl
using namespace std;
typedef long long ll;
typedef p... | a.cc: In function 'int main()':
a.cc:45:6: error: expected '}' at end of input
45 | }
| ^
a.cc:32:11: note: to match this '{'
32 | int main(){
| ^
|
s091499952 | p01275 | C++ | #include <cstdio>
#define rep(n) for(int i=0;i<n;i++)
#define repp(j, n) for(int j=0;j<n;j++)
#define reppp(i, m, n) for(int i=m;i<n;i++)
using namespace std;
int k;
int dfs(vector<int> a, vector<int> b, int i){
if(i == k-1) return (a[i] == b[i] ? 0LL : 1LL);
int ret = INT_MAX, rotate = (b[i]-a[i]+10) % 10... | a.cc:11:9: error: 'vector' was not declared in this scope
11 | int dfs(vector<int> a, vector<int> b, int i){
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <cstdio>
+++ |+#include <vector>
2 |
a.cc:1... |
s641621227 | p01275 | C++ | #include <cstdio>
#include <vector>
#define rep(n) for(int i=0;i<n;i++)
#define repp(j, n) for(int j=0;j<n;j++)
#define reppp(i, m, n) for(int i=m;i<n;i++)
using namespace std;
int k;
int dfs(vector<int> a, vector<int> b, int i){
if(i == k-1) return (a[i] == b[i] ? 0LL : 1LL);
int ret = INT_MAX, rotate = (... | a.cc: In function 'int dfs(std::vector<int>, std::vector<int>, int)':
a.cc:15:15: error: 'INT_MAX' was not declared in this scope
15 | int ret = INT_MAX, rotate = (b[i]-a[i]+10) % 10;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#in... |
s285946528 | p01275 | C++ | #include <set>
#include <iostream>
#include <cstdio>
#include <queue>
#include <algorithm>
#include <tr1/unordered_set>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
typedef long long ll;
using namespace std;
inline int decode(ll data, int pos){
return (data >> (pos * 4)) & 0xf;
}
inline ll encode(int data, int ... | a.cc: In function 'bool operator<(const Data&, const Data&)':
a.cc:39:54: error: expected ';' before 'return'
39 | if(lhs.data != rhs.data) return lhs.dist > rhs.dist
| ^
| ;
40 | return lhs.c... |
s060253754 | p01275 | C++ | #include <set>
#include <iostream>
#include <cstdio>
#include <queue>
#include <algorithm>
#include <tr1/unordered_set>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
typedef long long ll;
using namespace std;
inline int decode(ll data, int pos){
return (data >> (pos * 4)) & 0xf;
}
inline ll encode(int data, int ... | a.cc: In function 'bool operator<(const Data&, const Data&)':
a.cc:39:54: error: expected ';' before 'return'
39 | if(lhs.data != rhs.data) return lhs.dist > rhs.dist
| ^
| ;
40 | return lhs.c... |
s102395164 | p01275 | C++ | #include <set>
#include <iostream>
#include <cstdio>
#include <queue>
#include <algorithm>
#include <tr1/unordered_set>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
typedef long long ll;
using namespace std;
inline int decode(ll data, int pos){
return (data >> (pos * 4)) & 0xf;
}
inline ll encode(int data, int ... | a.cc: In function 'int main()':
a.cc:70:53: error: 'class std::vector<int>' has no member named 'e'
70 | tmp.erase(unique(tmp.begin(), tmp.end()), tmp.e
| ^
a.cc:107:15: error: expected primary-expression before '}' token
107 | }else{
... |
s506442811 | p01279 | C++ | #include <iostream>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
using namespace std;
const int MAX_V = 200;
int V;
bool G[MAX_V][MAX_V];
int match[MAX_V];
bool used[MAX_V];
bool dfs(int v) {
used[v] = true;
for(int i = 0; i < V; i++) {
if(!G[v][i]) continue;
i... | a.cc: In function 'bool check(double)':
a.cc:50:36: error: 'sqrt' was not declared in this scope
50 | double d = sqrt((xa[i] - xb[j]) * (xa[i] - xb[j]) + (ya[i] - yb[j]) * (ya[i] - yb[j]));
| ^~~~
|
s872282015 | p01279 | C++ |
int i;
double min,max,d;
cout<<setprecision(8);
cout<<setiosflags(ios::fixed);
while(cin>>N>>M,N|M){
v.resize(N);
b.resize(M);
for(i=0;i<N;i++)cin>>v[i].x>>v[i].y>>v[i].v;
for(i=0;i<M;i++)cin>>b[i].x>>b[i].y;
min=INT_MAX;
p.resize(N);
for(i=0;i<N;i++)p[i]=i;
sort(p.begin(),... | a.cc:5:3: error: 'cout' does not name a type
5 | cout<<setprecision(8);
| ^~~~
a.cc:6:3: error: 'cout' does not name a type
6 | cout<<setiosflags(ios::fixed);
| ^~~~
a.cc:8:3: error: expected unqualified-id before 'while'
8 | while(cin>>N>>M,N|M){
| ^~~~~
a.cc:34:1: error: expe... |
s708359702 | p01279 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<climits>
#include<iomanip>
using namespace std;
struct data{double x,y,v;};
int main()
{
vector<data> v,b;
vector<int> p;
int N,M
int i;
double min,max,d;
cout<<setprecision(8);
cout<<setiosflags(ios::fixed);
while(cin>... | a.cc: In function 'int main()':
a.cc:13:14: error: template argument 1 is invalid
13 | vector<data> v,b;
| ^
a.cc:13:14: error: template argument 2 is invalid
a.cc:16:3: error: expected initializer before 'int'
16 | int i;
| ^~~
a.cc:22:17: error: 'M' was not declared in this scope
... |
s534139231 | p01279 | C++ | #include <iostream>
#include <queue>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
class Edge{
public:
int p, q; double cost;
Edge(int p, int q, double cost) : p(p), q(q), cost(cost) {}
bool operator < (const Edge &e) const { return cost > e.cost; }
};
const int INF = 10000000;
int ... | a.cc: In function 'int main()':
a.cc:48:17: error: 'memset' was not declared in this scope
48 | memset(capa, 0, sizeof(capa));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <algorithm>... |
s396176709 | p01279 | C++ | #include<cstdio>
#include<vector>
#include<cmath>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef double D;
inline D dis(D x1, D y1, D x2, D y2){
return sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) );
}
const D EPS = 1e-8;
int n,m;
D x[110],y[110],v[110];
D px[110],py[110];
D t[110][110];
int match[2... | a.cc: In function 'int bimatch(D)':
a.cc:43:3: error: 'memset' was not declared in this scope
43 | memset(match,-1,sizeof(match));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<cmath>
+++ |+#include <cstring>
... |
s560559388 | p01279 | C++ | #include<iostream>
#include<vector>
#include<utility>
struct troop{
troop(int a,int b,int c){
x=a;
y=b;
v=c;
}
int x,y,v;
};
class base{
int x,y,trID;
public:
base(int a,int b,int c){
x=a;
y=b;
trID=c;
}
double time(troop &tr){
return sqrt(((tr.x-x)*(tr.x-x)+(tr.y-y)*(tr.y-y)))/tr.v;
}
void set... | a.cc: In member function 'double base::time(troop&)':
a.cc:22:24: error: 'sqrt' was not declared in this scope
22 | return sqrt(((tr.x-x)*(tr.x-x)+(tr.y-y)*(tr.y-y)))/tr.v;
| ^~~~
|
s856746515 | p01279 | C++ | #include<iostream>
#include<vector>
#include<utility>
struct troop{
troop(int a,int b,int c){
x=a;
y=b;
v=c;
}
int x,y,v;
};
class base{
int x,y,trID;
public:
base(int a,int b,int c){
x=a;
y=b;
trID=c;
}
double time(troop &tr){
return sqrt(((tr.x-x)*(tr.x-x)+(tr.y-y)*(tr.y-y)))/tr.v;
}
void set... | a.cc: In member function 'double base::time(troop&)':
a.cc:22:24: error: 'sqrt' was not declared in this scope
22 | return sqrt(((tr.x-x)*(tr.x-x)+(tr.y-y)*(tr.y-y)))/tr.v;
| ^~~~
|
s166505901 | p01280 | C++ | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#define L 16*9*5*7*11
int Q[25][25]; // d周期のi時間目の量
int T[L];
int main(){
int N,d,t,q;
for(;scanf("%d",&N),N;){
memset(Q,0,sizeof(Q));
for(int i=0;i<N;++i){
scanf("%d%d",&d,&t);
for(int j=0;j<d;++j){
scanf("%d",&q);
Q[d][(j+d-t)%d] += q;
}
... | a.cc: In function 'int main()':
a.cc:10:17: error: 'memset' was not declared in this scope
10 | memset(Q,0,sizeof(Q));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <cstdlib>
+++ |+#... |
s593370752 | p01280 | C++ | #include <iostream>
#include <vector>
using namespace std;
int gcd(int a, int b) { return b==0?a:gcd(b,a%b); }
int lcm(int a, int b) { return a*b/gcd(a,b); }
int main(){
int n;
while(cin >> n, n){
int size[100];
vector<int> vol[100];
for(int i=0;i<n;i++){
int offset;
cin >> size[i] >> offset;
vol[i]... | a.cc: In function 'int main()':
a.cc:22:17: error: 'memset' was not declared in this scope
22 | memset(used, false, sizeof(used));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector... |
s902849084 | p01281 | C++ | #include <iostream>
using namespace std;
int ans, w, h;
int a[20][20];
void search(int pos){
for(int i=pos;i<=w*h;i++){
if(i==w*h) { ans++; return; }
int x = i%w, y = i/w;
if(a[x][y]!=-1) continue;
if(x!=0&&y!=0&&a[x-1][y]!=a[x-1][y-1]&&a[x-1][y-1]!=a[x][y-1]) return;
a[x][y] = i;
if(y!=h-1&&a[x][y+1]==... | a.cc: In function 'int main()':
a.cc:32:17: error: 'memset' was not declared in this scope
32 | memset(a, -1, sizeof(a));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++... |
s839662172 | p01281 | C++ | #include <iostream>
#include <cstdio>
#include <stdio.h>
using namespace std;
//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int board[44][44];
int h, w;
int DFS(int x, int y, int n){
int ret = 0;
while(board[x][y] != 0){
x++;
... | a.cc: In function 'int main()':
a.cc:56:17: error: 'memset' was not declared in this scope
56 | memset(board, 0, sizeof(board));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cstdio>
... |
s406075039 | p01281 | C++ | #include <iostream>
#include <cstdio>
#include <stdio.h>
#include <string>
using namespace std;
//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int board[44][44];
int h, w;
int DFS(int x, int y, int n){
int ret = 0;
while(board[x][... | a.cc: In function 'int main()':
a.cc:57:17: error: 'memset' was not declared in this scope
57 | memset(board, 0, sizeof(board));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cstdio>
... |
s587947449 | p01282 | C | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <ctype.h>
#include <limits.h>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <stack>
#include <set>
#include <bitset>
#define CLR(a) memset(a, 0, sizeof(a))
#define RE... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s781063362 | p01282 | C++ | #include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAX_N 1000 + 16
#define MOD 1000003
typedef long long LL;
int
dp_a[MAX_N][MAX_N], // dp_a[i][j]??¨?????\A?????´????????????i???????°????j???A?????????????????°
dp_b[MAX_N][MAX_N], // dp_b[i][j]??... | a.cc: In function 'void solve()':
a.cc:69:18: error: 'i' was not declared in this scope
69 | dp_b[i][j + 1] += dp_b[i][j];
| ^
|
s826467916 | p01282 | C++ | #include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAX_N 1000 + 16
#define MOD 1000003
typedef long long LL;
int
dp_a[MAX_N][MAX_N], // dp_a[i][j]??¨?????\A?????´????????????i???????°????j???A?????????????????°
dp_b[MAX_N][MAX_N], // dp_b[i][j]??... | a.cc: In function 'void solve()':
a.cc:69:18: error: 'i' was not declared in this scope
69 | dp_b[i][j + 1] += dp_b[i][j];
| ^
|
s913475237 | p01283 | Java | #include <bits/stdc++.h>
using namespace std;
#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
int N;
int S, A, C;
int const M = 256;
vector<int> I;
int R[M];
int calcR(int i) {
if(i==0) { return R[0] = S; }
return R[i] = (A*calcR(i-1)+C) % M;
}
inline int O(int i) { return (I[i]+R[i+1]... | Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
^
Main.java:5: error: illegal character: '#'
#define REP(i,a,b) for(int i=a;i<(int)b;i++)
^
Main.java:5: error: class, interface, enum, or record expecte... |
s067442886 | p01283 | C++ | #include <cstdio>
#include <cstdlib>
#include <utility>
#include <typeinfo>
#include <cmath>
#include <numeric>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <stack>
#include <string>
#define REP(i,n) for(int i=0;i<n;i++)
typedef long long ll;
using namespace ... | a.cc: In function 'int main()':
a.cc:40:45: error: 'oo' was not declared in this scope
40 | xx[j][k][l][oo[j][k][l][ii[i+1]+r[j][k][l][i+1])%256]]++;
| ^~
a.cc:40:80: error: expected ']' before ')' token
40 | ... |
s822134938 | p01283 | C++ | #include<iostream>
#define M 256
using namespace std;
int main()
{
int N;
while (cin >> N && N != 0)
{
int L[M];
for (int i = 0; i < N; i++)
{
cin >> L[i];
}
int ansS = 0, ansA = 0, ansC = 0;
double minH = 1e10;
for (int s = 0; s <= 15; s++)
{
for (int a = 0; a <= 15; a++)
{
for (int c ... | a.cc: In function 'int main()':
a.cc:25:41: error: 'memset' was not declared in this scope
25 | memset(count, 0, sizeof (int) * M);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by add... |
s762221826 | p01283 | C++ | #include<iostream>
#include <stdio.h>
#define M 256
using namespace std;
int main()
{
int N;
while (cin >> N && N != 0)
{
int L[M];
for (int i = 0; i < N; i++)
{
cin >> L[i];
}
int ansS = 0, ansA = 0, ansC = 0;
double minH = 1e10;
for (int s = 0; s <= 15; s++)
{
for (int a = 0; a <= 15; a++)
... | a.cc: In function 'int main()':
a.cc:26:41: error: 'memset' was not declared in this scope
26 | memset(count, 0, sizeof (int) * M);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by add... |
s360228481 | p01283 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <math.h>
#define m 256
using namespace std;
int main(){
int n;
while(cin>>n){
if(n==0) break;
int ii[n+1],r[n+1],o[n+1];
for(int i=1;i<=n;i++){
cin>>ii[i];
}
int ss=16,aa=16,cc=16;
float h,mh=100;
for(int s=15;s>=0;s... | a.cc:49:50: error: stray '#' in program
49 | }#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:49:51: error: 'include' was not declared in this scope
49 | ... |
s898610475 | p01283 | C++ | #include <climits>
#include <cstdlib>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
#define FOR(it,c) for(__typeof((c).begin())it=(c).begin(); it!=(c).end();++it)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
const int mod = 256;
for(int n; cin >> n, n;) {
vector<int> l(n);
... | a.cc: In function 'int main()':
a.cc:36:60: error: 'log2' was not declared in this scope
36 | h -= tmp * log2(tmp);
| ^~~~
|
s490849344 | p01283 | C++ | #include<iostream>
using namespace std;
struct S{
double min;
int s, a, c;
};
int main(){
int N, l[257],r[257],o[257],x[257];
int s, a, c;
double H;
S ans;
while (1){
cin >> N;
if (N == 0) break;
for (int i = 1; i <= N; i++){
cin >> l[i];
}
for (s = 0; s <= 15; s++){
for (a = 0; a <= 15; ... | a.cc: In function 'int main()':
a.cc:44:85: error: 'log' was not declared in this scope; did you mean 'long'?
44 | if(x[i]!=0) H += ((double)x[i] / N)*log((double)x[i] / N);
| ^~~... |
s582016311 | p01283 | C++ | #include<iostream>
using namespace std;
struct S{
double min;
int s, a, c;
};
int main(){
int N, l[257],r[257],o[257],x[257];
int s, a, c;
double H;
S ans;
while (1){
cin >> N;
if (N == 0) break;
for (int i = 1; i <= N; i++){
cin >> l[i];
}
for (s = 0; s <= 15; s++){
for (a = 0; a <= 15; ... | a.cc: In function 'int main()':
a.cc:44:85: error: 'log' was not declared in this scope; did you mean 'long'?
44 | if(x[i]!=0) H += ((double)x[i] / N)*log((double)x[i] / N);
| ^~~... |
s886253903 | p01284 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
int b[100];
int d[110];
int dp[110][31];
int main(){
int a;
while(scanf("%d",&a),a){
for(int i=0;i<a;i++)scanf("%d",b+i);
int c;scanf("%d",&c);
for(int i=0;i<110;i++)d[i]=-1;
for(int i=0;i<c;i++){
int p,q;scanf("%d%d",&p,&q);
p--;
if(!~dp[p]|... | a.cc: In function 'int main()':
a.cc:16:34: error: wrong type argument to bit-complement
16 | if(!~dp[p]||dp[p]>q)d[p]=q;
| ~~~~^
a.cc:16:42: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
16 | if(!~dp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.