submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s779222925 | p00891 | C++ | #include <cstdio>
#include <set>
using namespace std;
typedef unsigned long long ull;
int n, m, p;
char code[1010][1010];
bool ma[1010][1010];
bool pattern[1010][1010];
??
ull ha[1010][1010], tmp[1010][1010];
ull mh[1010][1010];
void compute_hash(bool a[1010][1010], int n, int m) {
????????const ull B1 = 9983;
????????... | a.cc:9:1: error: expected unqualified-id before '?' token
9 | ??
| ^
a.cc: In function 'void compute_hash(bool (*)[1010], int, int)':
a.cc:13:1: error: expected primary-expression before '?' token
13 | ????????const ull B1 = 9983;
| ^
a.cc:13:2: error: expected primary-expression before '?' token
... |
s022949543 | p00891 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);
#define REP... | a.cc: In function 'PMA* buildPMA(char (*)[1010], int)':
a.cc:57:5: error: 'queue' was not declared in this scope
57 | queue<PMA*> que;
| ^~~~~
a.cc:8:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
7 | #include <vector>
+++ |+#include <q... |
s966463966 | p00892 | C++ |
#if 0
#endif
#include <vector>
#include <algorithm>
#include <iostream>
#define MAX_M 105
#define MAX_N 105
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
double double_max = numeric_limits<double>::max();
double double_min = numeric_limits<double>::min();
int M, N;
int X1[MAX_M], Y... | a.cc:13:21: error: 'numeric_limits' was not declared in this scope
13 | double double_max = numeric_limits<double>::max();
| ^~~~~~~~~~~~~~
a.cc:13:36: error: expected primary-expression before 'double'
13 | double double_max = numeric_limits<double>::max();
| ... |
s672535739 | p00892 | C++ | #include <bits/stdc++.h>
namespace using sdt;
int m,n;
const double EPS = 1e-11;
vector<pair<int,int> > Pxy,Pyz;
pair<int,int> tem;
vector<int> X;
int findMax(vector<int> vec) {
int maxs = -999;
for (auto v : vec) {
if (maxs < v) maxs = v;
}
return maxs;
}
int findMin(vector<int> vec) {
i... | a.cc:3:11: error: expected identifier before 'using'
3 | namespace using sdt;
| ^~~~~
a.cc:3:17: error: expected nested-name-specifier before 'sdt'
3 | namespace using sdt;
| ^~~
a.cc:6:1: error: 'vector' does not name a type
6 | vector<pair<int,int> > Pxy,Pyz;
| ... |
s967081456 | p00892 | C++ | #include <bits/stdc++.h>
namespace using std;
int m,n;
const double EPS = 1e-11;
vector<pair<int,int> > Pxy,Pyz;
pair<int,int> tem;
vector<int> X;
int findMax(vector<int> vec) {
int maxs = -999;
for (auto v : vec) {
if (maxs < v) maxs = v;
}
return maxs;
}
int findMin(vector<int> vec) {
i... | a.cc:3:11: error: expected identifier before 'using'
3 | namespace using std;
| ^~~~~
a.cc:3:17: error: expected nested-name-specifier before 'std'
3 | namespace using std;
| ^~~
a.cc:6:1: error: 'vector' does not name a type
6 | vector<pair<int,int> > Pxy,Pyz;
| ... |
s304046796 | p00892 | C++ | #include <bits/stdc++.h>
using namespace std;
int m,n;
const double EPS = 1e-11;
vector<pair<int,int> > Pxy,Pyz;
pair<int,int> tem;
vector<int> X;
int findMax(vector<int> vec) {
int maxs = -999;
for (auto v : vec) {
if (maxs < v) maxs = v;
}
return maxs;
}
int findMin(vector<int> vec) {
i... | a.cc: In function 'double width(std::vector<std::pair<int, int> >, int)':
a.cc:28:27: error: 'class std::vector<std::pair<int, int> >' has no member named 'len'
28 | for(int i=0;i<polygon.len();i++){
| ^~~
a.cc:30:47: error: 'class std::vector<std::pair<int, int> >' has no member ... |
s764153539 | p00892 | C++ | #include <bits/stdc++.h>
using namespace std;
int m,n;
const double EPS = 1e-11;
vector<pair<int,int> > Pxy,Pyz;
pair<int,int> tem;
vector<int> X;
double width(vector<pair<int,int> > polygon,double x){
vector<double> w;
for(int i=0;i<polygon.len();i++){
pair<int,int> p=polygon[i];
pair<int,in... | a.cc: In function 'double width(std::vector<std::pair<int, int> >, double)':
a.cc:13:27: error: 'class std::vector<std::pair<int, int> >' has no member named 'len'
13 | for(int i=0;i<polygon.len();i++){
| ^~~
a.cc:15:47: error: 'class std::vector<std::pair<int, int> >' has no memb... |
s059425200 | p00892 | C++ | #include <bits/stdc++.h>
using namespace std;
int m,n;
const double EPS = 1e-11;
vector<pair<int,int> > Pxy,Pyz;
pair<int,int> tem;
vector<int> X;
double width(vector<pair<int,int> > polygon,double x){
vector<double> w;
for(int i=0;i<polygon.size();i++){
pair<int,int> p=polygon[i];
pair<int,i... | a.cc: In function 'int volume(std::vector<std::pair<int, int> >, std::vector<std::pair<int, int> >, std::vector<int>)':
a.cc:35:34: error: 'pxy' was not declared in this scope; did you mean 'Pxy'?
35 | int xmin = max((*min_element(pxy.begin(), pxy.end())).first,
| ^~~
... |
s672938507 | p00892 | C++ | #include <bits/stdc++.h>
using namespace std;
int m,n;
const double EPS = 1e-11;
vector<pair<int,int> > Pxy,Pyz;
pair<int,int> tem;
vector<int> X;
double width(vector<pair<int,int> > polygon,double x){
vector<double> w;
for(int i=0;i<polygon.size();i++){
pair<int,int> p=polygon[i];
pair<int,i... | a.cc: In function 'int main()':
a.cc:60:25: error: 'x' was not declared in this scope
60 | X.push_back(x);
| ^
a.cc:64:13: error: 'Pxz' was not declared in this scope; did you mean 'Pyz'?
64 | Pxz.push_back(tem);
| ^~~
| Pyz... |
s767375766 | p00892 | C++ | #include <bits/stdc++.h>
using namespace std;
int m,n;
const double EPS = 1e-11;
vector<pair<int,int> > Pxy,Pyz;
pair<int,int> tem;
vector<int> X;
double width(vector<pair<int,int> > polygon,double x){
vector<double> w;
for(int i=0;i<polygon.size();i++){
pair<int,int> p=polygon[i];
pair<int,i... | a.cc: In function 'int main()':
a.cc:64:13: error: 'Pxz' was not declared in this scope; did you mean 'Pyz'?
64 | Pxz.push_back(tem);
| ^~~
| Pyz
a.cc:67:38: error: 'Pxz' was not declared in this scope; did you mean 'Pyz'?
67 | cout << fixed << volume(Pxy, P... |
s037672876 | p00892 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>
#include <stack>
#include <queue>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <list>
#include <string.h>
using namespace std;
typedef long long int ll; typedef pair <int, int> P;
const double INF = 1000000000; const do... | a.cc: In function 'int main()':
a.cc:36:22: error: 'min_element' was not declared in this scope
36 | int minx1 = *min_element(x1, x1 + m), maxx1 = *max_element(x1, x1 + m);
| ^~~~~~~~~~~
a.cc:42:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
42 | s... |
s129035436 | p00892 | C++ | #include <iostream>
#include <vector>
using namespace std;
double width(int *x, int *y, int size, double given_x){
double max_point = -1000.0, min_point = 1000.0;
for(int i = 0; i < size; i++){
double x1 = x[i], y1 = y[i], x2 = x[(i+1)%size], y2 = y[(i+1)%size];
if((x1-given_x)*(x2-given_x) <=... | a.cc: In function 'int main()':
a.cc:45:9: error: 'sort' was not declared in this scope; did you mean 'short'?
45 | sort(v.begin(), v.end());
| ^~~~
| short
|
s268345524 | p00892 | 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
| |
s978773360 | p00892 | C++ | #include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#define INF 1000000000
using namespace std;
const double g = 9.8;
int n, m, x, y;
int x1[105], y1[105], x2[105], z2[105];
double width(int* x, int* y, int n, double xx) {
double lb = INF, ub = -INF;
for (int i = 0; i < n; ++i) {
d... | a.cc:9:20: error: 'int y1 [105]' redeclared as different kind of entity
9 | int x1[105], y1[105], x2[105], z2[105];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_... |
s033314338 | p00892 | C++ | #include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#define INF 1000000000
using namespace std;
const double g = 9.8;
int n, m, x, y;
int x1[105], y1[105], x2[105], z2[105];
double width(int* x, int* y, int n, double xx) {
double lb = INF, ub = -INF;
for (int i = 0; i < n; ++i) {
d... | a.cc:9:20: error: 'int y1 [105]' redeclared as different kind of entity
9 | int x1[105], y1[105], x2[105], z2[105];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_... |
s651881546 | p00892 | C++ | #include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#define INF 1000000000
using namespace std;
const double g = 9.8;
int n, m, x, y;
int x1[105], y1[105], x2[105], z2[105];
double width(int* x, int* y, int n, double xx) {
double lb = INF, ub = -INF;
for (int i = 0; i < n; ++i) {
d... | a.cc:9:20: error: 'int y1 [105]' redeclared as different kind of entity
9 | int x1[105], y1[105], x2[105], z2[105];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_... |
s153126974 | p00892 | C++ | #include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#define INF 1000000000
using namespace std;
int n, m, x, y;
int x1[105], y1[105], x2[105], z2[105];
double width(int x[], int y[], int n, double xx) {
double lb = INF, ub = -INF;
for (int i = 0; i < n; ++i) {
double x1 = x[i], y1 ... | a.cc:8:20: error: 'int y1 [105]' redeclared as different kind of entity
8 | int x1[105], y1[105], x2[105], z2[105];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_... |
s464272162 | p00892 | C++ | #include <iostream>
#include <vector>
#include <complex>
#include <stdio.h>
using namespace std;
typedef complex<int> P;
double getWidth(vector<P> &g, int x){
double m = 1e10, M = -1e10;
for(int i=0;i<g.size();i++){
P a = g[i], b = g[(i+1)%g.size()];
if(real(a) > real(b)) swap(a, b);
if(real(a) != real(b) &&... | a.cc: In function 'int main()':
a.cc:31:25: error: 'fin' was not declared in this scope; did you mean 'sin'?
31 | fin >> real(gy[i]) >> imag(gy[i]);
| ^~~
| sin
a.cc:36:25: error: 'fin' was not declared in this scope; did you mean 's... |
s332495066 | p00892 | C++ | #include <fstream>
#include <vector>
#include <complex>
#include <stdio.h>
using namespace std;
typedef complex<int> P;
double getWidth(vector<P> &g, int x){
double m = 1e10, M = -1e10;
for(int i=0;i<g.size();i++){
P a = g[i], b = g[(i+1)%g.size()];
if(real(a) > real(b)) swap(a, b);
if(real(a) != real(b) && ... | a.cc: In function 'int main()':
a.cc:27:15: error: 'cin' was not declared in this scope
27 | while(cin >> m >> n, m){
| ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #include <complex>
+++ |+#include <i... |
s146105976 | p00892 | C++ | #include <bits/stdc++.h>
// ant book
using namespace std;
const int INF = 1<<29;
const int MAX_N = 100;
const int MAX_M = 100;
int M, N;
int X1[MAX_M], Y1[MAX_M];
int X2[MAX_N], Z2[MAX_N];
double width(int* X, int* Y, int n, double x) {
double lb = INF, ub = -INF;
for(itn i=0; i<n; i++) {
double x1 = X[i], y... | a.cc: In function 'double width(int*, int*, int, double)':
a.cc:15:7: error: 'itn' was not declared in this scope; did you mean 'int'?
15 | for(itn i=0; i<n; i++) {
| ^~~
| int
a.cc:15:16: error: 'i' was not declared in this scope
15 | for(itn i=0; i<n; i++) {
| ^
... |
s640116097 | p00893 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const dou... | a.cc: In function 'int main()':
a.cc:249:7: error: 'gets' was not declared in this scope; did you mean 'getw'?
249 | gets(str);
| ^~~~
| getw
|
s720643104 | p00893 | C++ | #include <stdio.h>
#include <string>
#include <vector>
#include <map>
using namespace std;
FILE *in = freopen("input.txt", "r", stdin);
//FILE *out = freopen("output.txt", "w", stdout);
#define M 32768
typedef long long ll;
int mod(ll x) {
return (M + x % M) % M;
}
class matrix{
public:
int n, m;
vector<vector... | a.cc: In member function 'matrix matrix::operator+(matrix)':
a.cc:46:64: error: no matching function for call to 'std::exception::exception(const char [18])'
46 | throw new exception("n, m is not same!");
| ^
In file include... |
s804928545 | p00893 | C++ | #include <stdio.h>
#include <string>
#include <vector>
#include <map>
using namespace std;
FILE *in = freopen("input.txt", "r", stdin);
//FILE *out = freopen("output.txt", "w", stdout);
#define M 32768
typedef long long ll;
int mod(ll x) {
return (M + x % M) % M;
}
class matrix{
public:
int n, m;
vector<vector... | a.cc: In member function 'matrix matrix::operator+(matrix)':
a.cc:46:60: error: no matching function for call to 'std::exception::exception(const char [18])'
46 | throw exception("n, m is not same!");
| ^
In file included from /... |
s490468645 | p00893 | C++ | #include <stdio.h>
#include <string>
#include <vector>
#include <map>
using namespace std;
FILE *in = freopen("input.txt", "r", stdin);
//FILE *out = freopen("output.txt", "w", stdout);
#define M 32768
typedef long long ll;
int mod(ll x) {
return (M + x % M) % M;
}
class matrix{
public:
int n, m;
vector<vector... | a.cc: In member function 'matrix matrix::operator+(matrix)':
a.cc:46:60: error: no matching function for call to 'std::exception::exception(const char [18])'
46 | throw exception("n, m is not same!");
| ^
In file included from /... |
s935243965 | p00894 | C | #include <bits/stdc++.h>
using namespace std;
map<string, int> dict;
map<string, int> enter;
int main()
{
//freopen("input.txt", "r" ,stdin);
int n;
while (scanf("%d", &n)==1)
{
dict.clear();
enter.clear();
int m, d, hours, minutes;
char str[100];
char flag[10... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s045720170 | p00894 | C | #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <map>
#include <vector>
#include <cmath>
#include <queue>
using namespace std;
int get(int hour,int mi)
{
return hour*60+mi;
}
int main()
{
int n;
while(scanf("%d",&n),n)
{
int mon,day,hour,mi,ans=0,per,maxn=0;
... | main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s471935600 | p00894 | C | #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <string>
#include <time.h>
#include <math.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
using namespace std;
#define inf 0x3f3f3f3f
#define eps 1e-8
#d... | main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s566668856 | p00894 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
typedef struct U
{
tm L;
int F,t;
}U;
tm set(int M,int D,int h,int m)
{
tm t={0,m,h,D,M,100,0};
return t;
}
int N,i,j,G,M,D,h,m,u,R;
U X[1000];
int main()
{
char f;
for(;scanf("%d\n",&N),N;)
{
G=0;
memset(X,0,sizeof(X));
for(i=0;i... | main.c:8:9: error: unknown type name 'tm'
8 | tm L;
| ^~
main.c:5:1: note: 'tm' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
4 | #include<time.h>
+++ |+#include <time.h>
5 |
main.c:12:1: error: unknown type name 'tm'; use 'struct' keyword t... |
s189910018 | p00894 | C++ | #include<iostream>
#include<cstring>
using namespace std;
int lastin[1111];
int blessed[1111];
bool manin[1111];
bool valkyria_in;
int valkyria_time;
int n;
string s;
int ans;
int hr,mi;
char move;
int index;
void solve(){
int t=hr*60+mi;
if(move=='I'){
if(index==0){
valkyria_in=true;
valkyria_time=t;
}
e... | a.cc:14:5: error: 'int index' redeclared as different kind of entity
14 | int index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:2:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const... |
s321107683 | p00894 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) a.begin(),a.end()
using namespace std;
int main(void){
int n;
while(cin>>n,n!=0){
map<int, valarray<int>> lg;
map<int,int> ans;
int mm,dd,h,m,id,yesterday=0;
rep(ln,n+1){
... | a.cc: In function 'int main()':
a.cc:4:18: error: 'class std::valarray<int>' has no member named 'begin'
4 | #define all(a) a.begin(),a.end()
| ^~~~~
a.cc:21:37: note: in expansion of macro 'all'
21 | partial_sum(all(q),begin(q));
| ... |
s962458139 | p00894 | C++ | /*
* GCA : "Computer is artificial subject absolutely,Math is God"
*/
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <climits>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <cctype>
#include <utility>
using namespace std;
#ifdef DEB... | a.cc:47:11: error: 'int time [1005]' redeclared as different kind of entity
47 | int time[M];
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:... |
s057015136 | p00894 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n,t[1005],ent[1005],ans;
bool isin[1500];
char md[10],hm[10],io[10],id[10];
char mdd[10];
int gettime()
{
int hh=(hm[0]-'0')*10+(hm[1]-'0');
int mi=(hm[3]-'0')*10+(hm[4]-'0');
return hh*60+mi;
}
int main()
{
... | a.cc: In function 'int main()':
a.cc:43:17: error: expected '}' before 'else'
43 | else
| ^~~~
a.cc:39:17: note: to match this '{'
39 | {
| ^
|
s663125418 | p00895 | Java | import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
public class SorcerersDonut {
Scanner in = new Scanner(System.in);
int h, w;
char[][] map;
boolean[][] visited;
int[] dirx = {-1, 0, 1, -1, 1, -1, 0, 1};
int[] diry = {-1, -1, -1, 0, 0, 1, 1, 1};
HashSet<String> hash;
String ans;
int... | Main.java:5: error: class SorcerersDonut is public, should be declared in a file named SorcerersDonut.java
public class SorcerersDonut {
^
1 error
|
s014973662 | p00895 | C | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
const int maxn = 40;
const int dx[] = {1, -1, 0, 0 , 1, 1, -1, -1},
dy[] = {0, 0, 1, -1, 1, -1, 1, -1};
int n, m, ml, cnt;
char donut[maxn][maxn];
string ans[2000... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s770689389 | p00895 | C | #include <cstdio>
#include <string>
#include <set>
#include <vector>
using namespace std;
int dr[]={-1, -1, -1, 0, 0, 1, 1, 1};
int dc[]={-1, 0, 1, -1, 1, -1, 0, 1};
bool cmp(const string& a, const string& b)
{
if (a.size()<b.size()) return 1;
if (a.size()>b.size()) return 0;
return a>b;
}
int main()
{
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s228286567 | p00895 | C | #include <cstdio>
#include <string>
#include <map>
using namespace std;
int h, w;
char str[32][32];
int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
void generate(int sy, int sx, map<string, int> &rec)
{
char tmp[2] = {0, 0};
for (int i = 0; i < 8; i++){
tmp[0] = str[sy][sx];
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s294084564 | p00895 | C++ | #include<iostream>
#include<vector>
#include<cstring>
using namespace std;
int lcm(int a, int b){
return a/__gcd(a, b) * b;
}
int main(int argc, char *argv[]){
int w, h;
while(cin >> h >> w, h){
string torus[30];
string s[2222];
for (int i = 0; i < h; i++) {
cin >> torus[i];
}
int l = ... | a.cc: In function 'int lcm(int, int)':
a.cc:7:12: error: '__gcd' was not declared in this scope
7 | return a/__gcd(a, b) * b;
| ^~~~~
a.cc: In function 'int main(int, char**)':
a.cc:41:5: error: 'sort' was not declared in this scope; did you mean 'short'?
41 | sort(s, s + 8*w*h);
| ... |
s705706080 | p00895 | C++ | #include<iostream>
#include<vector>
#include<cstring>
using namespace std;
int lcm(int a, int b){
return a/__gcd(a, b) * b;
}
int main(int argc, char *argv[]){
int w, h;
while(cin >> h >> w, h){
string torus[30];
string s[2222];
for (int i = 0; i < h; i++) {
cin >> torus[i];
}
int l = ... | a.cc: In function 'int lcm(int, int)':
a.cc:7:12: error: '__gcd' was not declared in this scope
7 | return a/__gcd(a, b) * b;
| ^~~~~
a.cc: In function 'int main(int, char**)':
a.cc:41:5: error: 'sort' was not declared in this scope; did you mean 'short'?
41 | sort(s, s + 8*w*h);
| ... |
s029100274 | p00895 | C++ | #include<iostream>
#include<vector>
#include<cstring>
using namespace std;
int lcm(int a, int b){
return a/gcd(a, b) * b;
}
int main(int argc, char *argv[]){
int w, h;
while(cin >> h >> w, h){
string torus[30];
string s[2222];
for (int i = 0; i < h; i++) {
cin >> torus[i];
}
int l = lc... | a.cc: In function 'int lcm(int, int)':
a.cc:7:12: error: 'gcd' was not declared in this scope
7 | return a/gcd(a, b) * b;
| ^~~
a.cc: In function 'int main(int, char**)':
a.cc:41:5: error: 'sort' was not declared in this scope; did you mean 'short'?
41 | sort(s, s + 8*w*h);
| ^~~... |
s993868470 | p00895 | C++ | #include<iostream>
#include<vector>
#include<cstring>
using namespace std;
int lcm(int a, int b){
return a/gcd(a, b) * b;
}
int main(int argc, char *argv[]){
int w, h;
while(cin >> h >> w, h){
string torus[30];
string s[2222];
for (int i = 0; i < h; i++) {
cin >> torus[i];
}
int l = lc... | a.cc: In function 'int lcm(int, int)':
a.cc:7:12: error: 'gcd' was not declared in this scope
7 | return a/gcd(a, b) * b;
| ^~~
a.cc: In function 'int main(int, char**)':
a.cc:41:5: error: 'sort' was not declared in this scope; did you mean 'short'?
41 | sort(s, s + 8*w*h);
| ^~~... |
s861404882 | p00895 | C++ | #include<iostream>
#include<vector>
#include<cstring>
using namespace std;
int gcd(int a, int b){
if(b == 0)return a;
return gcd(b, a%b);
}
int lcm(int a, int b){
return a/gcd(a, b) * b;
}
int main(int argc, char *argv[]){
int w, h;
while(cin >> h >> w, h){
string torus[30];
string s[2222];
for... | a.cc: In function 'int main(int, char**)':
a.cc:46:5: error: 'sort' was not declared in this scope; did you mean 'short'?
46 | sort(s, s + 8*w*h);
| ^~~~
| short
|
s116829945 | p00895 | C++ | #include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
int h,w;
string fie[11];
int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,1,-1};
map<string,int> cnt;
bool used[11][21];
vector<string> index;
void dfs(int y,in... | a.cc:16:16: error: 'std::vector<std::__cxx11::basic_string<char> > index' redeclared as different kind of entity
16 | vector<string> index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:2:
/usr/include/st... |
s284848899 | p00895 | C++ | #include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
int h,w;
string fie[11];
int dx[8]={1,0,-1,0,1,1,-1,-1};
int dy[8]={0,1,0,-1,1,-1,1,-1};
map<string,int> cnt;
bool used[11][21];
vector<string> index;
void dfs(int y,in... | a.cc:16:16: error: 'std::vector<std::__cxx11::basic_string<char> > index' redeclared as different kind of entity
16 | vector<string> index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:2:
/usr/include/st... |
s920019918 | p00895 | C++ | #include <bits/stdc++.h>
using namespace std;
long long int dx[] = { 0,1,1,1,0,-1,-1,-1 };
long long int dy[] = { 1,1,0,-1,-1,-1,0,1 };
int main()
{
long long int M , N;
while(cin >> M >> N , M || N)
{
vector<vector<char>>D(M , vector<char>(N));
set<string>SS;
string ans;
for(size_t i = 0; i < M; i++)
{... | a.cc: In function 'int main()':
a.cc:51:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s683486203 | p00895 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
int h,w;
int i,j,k;
int ai[]={ 1, 1, 1, 0, 0,-1,-1,-1};
int aj[]={ 1, 0,-1, 1,-1, 1, 0,-1};
cin >> h >> w;
while(h!=0){
string str[10];
for(i=0;i<h;i++) cin >> str[i];
vector <string> li;
vector <string> an... | a.cc: In function 'int main()':
a.cc:32:22: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
32 | if(find(li.begin(),li.end(),buf)!=li.end()) {
| ~~~~^~... |
s166505643 | p00895 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<set>
using namespace std;
typedef vector<int> vi;
set<string> cands;
int dy[]={-1,-1,-1,0,0,1,1,1};
int dx[]={-1,0,1,-1,1,-1,0,1};
int maxlength=0,h,w;
string ans="";
void check(int y,int x,string *board)
{
for(int k=0;k<8;k++)
{
bool visited[h][w];
... | a.cc: In function 'void check(int, int, std::string*)':
a.cc:17:5: error: 'memset' was not declared in this scope
17 | memset(visited,false,sizeof(visited));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<set>... |
s613753168 | p00895 | C++ | #include <map>
#include <vector>
#include <iostream>
using namespace std;
int m[29][29];
main(){
string s,t;
int h,w,i,j,x,y;
for(;cin>>h>>w,h;cout<<s<<endl){
vector<string>v;
for(i=0;i<h;i++)cin>>s,v.push_back(s);
s="0";
map<string,int>M;
for(i=0;i<h;i++)for(j=0;j<w;j++)for(x=-1;x<=1;x++)for(y=-1;y<=1;y++... | a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:16:25: error: 'memset' was not declared in this scope
16 | memset(m,0,sizeof(m));
| ^~~~~~
a.cc:4:1: note: 'mem... |
s479958262 | p00895 | C++ | #include <vector>
using namespace std;
#define REP(i,x)for(int i=0;i<x;i++)
string res;
int H,W,dx,dy,min_len;
char s[200];
string MAP[11];
bool visit[20][20];
vector<string> ss;
void dfs(int x,int y,int k){
if(visit[y][x]){
ss.push_back(string(s));
return;
}
s[k]=MAP[y][x]; visit[y][x]=1;
dfs((x + dx... | a.cc:5:1: error: 'string' does not name a type
5 | string res;
| ^~~~~~
a.cc:8:1: error: 'string' does not name a type
8 | string MAP[11];
| ^~~~~~
a.cc:10:8: error: 'string' was not declared in this scope
10 | vector<string> ss;
| ^~~~~~
a.cc:2:1: note: 'std::string' is defined in h... |
s669933805 | p00896 | C++ | #include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define FOR(i,k,n) for(int i=(k); i<(int)n; ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
template<class T> void debug(T begin, T end){ for(T i = begin; i != ... | a.cc: In function 'int main()':
a.cc:53:5: error: 'memset' was not declared in this scope
53 | memset(pairs, -1, sizeof(pairs));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <vector>
+++ |+#include <cstrin... |
s916318168 | p00896 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cctype>
using namespace std;
int tr[256], ans[256];
vector<string> split(string s)
{
vector<string> res;
stringstream ss(s);
string a;
while(ss >> a) { res.push_back(a); }
return res;
}
bool match(string ... | a.cc: In function 'int dfs(int, std::vector<std::__cxx11::basic_string<char> >&, std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:35:17: error: 'memcpy' was not declared in this scope
35 | memcpy(ans, tr, sizeof(ans));
| ^~~~~~
a.cc:7:1: note: 'memcpy' is defined in heade... |
s827204094 | p00896 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<algorithm>
using namespace std;
char read[100];
int n,cnt,ans,ti;
map<char ,char >mp,answer;
struct node
{
char st[100];
... | a.cc: In function 'int main()':
a.cc:78:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
78 | gets(read);
| ^~~~
| getw
|
s012998984 | p00896 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<algorithm>
using namespace std;
char read[100];
int n,cnt,ans,ti;
map<char ,char >mp,answer;
struct node
{
char st[100];
... | a.cc: In function 'int main()':
a.cc:78:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
78 | gets(read);
| ^~~~
| getw
|
s888012686 | p00896 | C++ | #include<cstdio>
#include<cstring>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
char str[21][30];
char s[100][30];
char ori[100][30];
char tmp[21];
int len[100];
int len1[30];
int n,m;
bool has=true;
bool mul=false;
vector<char>ans;
vector<int>ids[100];
void dfs(int u,const vector<char> ... | a.cc: In function 'void dfs(int, const std::vector<char>&)':
a.cc:26:25: error: 'i' was not declared in this scope
26 | if(len1[i]!=len[u])continue;
| ^
|
s093165224 | p00897 | Java | import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.PriorityQueue;
import java.util.Scanner;
public class CopyOfMain {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
int n = sc.nextInt();
... | Main.java:8: error: class CopyOfMain is public, should be declared in a file named CopyOfMain.java
public class CopyOfMain {
^
1 error
|
s870481401 | p00897 | C | #include <iostream>
#include <map>
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
typedef struct
{
int nam;
int dis;
int cans;
int teps;
}Node;
Node que[1001000];
int fro,las;
typedef struct
{
int u,v;
int dis;
int nex;
}NN;
NN edge[5000];
int first[5000];
i... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s423502140 | p00897 | C++ | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<queue>
#include<stack>
#include<set>
#include<map>
using namespace std;
const int INF=1000000000;
struct edge
{
int w,u,v,res,dis;
bool operator <(edge q)const
{
return v>q.v;
}
};
map <string,int> ... | a.cc:28:1: error: 'int index' redeclared as different kind of entity
28 | index,cap;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:4:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const cha... |
s892644745 | p00897 | C++ | #include <cstdio>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#define INF 1000000007
#define MAX_V 3030
typedef long long ll;
using namespace std;
struct edge{int to, cost;};
typedef pair < int, int> P;/... | a.cc: In function 'int main()':
a.cc:132:39: error: no match for 'operator!=' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_s... |
s465995145 | p00897 | C++ | #include <fstream>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <string>
#include <numeric>
#include <algorithm>
#include <functional>
#include <iterator>
#include <... | a.cc:52:2: error: 'ctm' does not name a type; did you mean 'tm'?
52 | }ctm;
| ^~~
| tm
a.cc:133:6: error: 'void jcc::dijkstra()' cannot be overloaded with 'void jcc::dijkstra()'
133 | void dijkstra()
| ^~~~~~~~
a.cc:58:6: note: previous declaration 'void jcc::dijkstra()'
58 | void dijks... |
s160533518 | p00897 | C++ | #include <fstream>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <string>
#include <numeric>
#include <algorithm>
#include <functional>
#include <iterator>
#include <... | a.cc:54:5: error: field 'ctms' has incomplete type 'jcc'
54 | jcc ctms;
| ^~~~
a.cc:47:8: note: definition of 'struct jcc' is not complete until the closing brace
47 | struct jcc
| ^~~
a.cc:158:2: error: expected '}' at end of input
158 | }
| ^
a.cc:48:1: note: to match this '{'
... |
s559087016 | p00897 | C++ | #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <functional>
#include <algorithm>
using namespace std;
#define... | a.cc:1:1: error: stray '\20' in program
1 | <U+0010>#include <iostream>
| ^~~~~~~~
a.cc:1:2: error: stray '#' in program
1 | #include <iostream>
| ^
a.cc:1:3: error: 'include' does not name a type
1 | #include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
... |
s752744252 | p00897 | C++ | #include <cstdio>
#include <iostream>
#include <string>
#include <map>
#include <vector>
using namespace std;
int N,M,cap;
struct edge{
int v,w;
edge(int _v,int _w):v(_v),w(_w){
}
};
vector<edge> ve[3005];
bool hasGas[3005];
bool visited[3005];
int res;
void DFS(int u,int t,int cur,int total){
if(u==t){
res = mi... | a.cc: In function 'int main()':
a.cc:57:17: error: 'memset' was not declared in this scope
57 | memset(hasGas,0,sizeof(hasGas));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <vector>
... |
s163222383 | p00897 | C++ | #include <cstdio>
#include <cstring>
#include <map>
#include <iostream>
#include <string>
#include <queue>
#include <vector>
using namespace std;
struct edge{
int t,c;
edge(int tt=0,int cc=0){
t=tt;
c=cc;
}
bool operator<(const edge& e1)const{
return c<e1.c;
}
};
typedef edge data;
int n,m,cap;
vector<e... | a.cc: In function 'void make_path(int)':
a.cc:34:40: error: template argument 1 is invalid
34 | priority_queue<data,vector<data>,greater<data> > que;
| ^
a.cc:34:40: error: template argument 2 is invalid
a.cc:34:54: error: template argument 1 is invalid
34 | ... |
s299525257 | p00897 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<functional>
using namespace std;
short n, m, k, p, dist[6007][2017], c[3000]; bool u[3000];
vector<string>v; string a[3000], b[3000], s1, s2; vector<pair<int, int>>x[7000];
int s(string Y) { return lower_bound(v.begin(), v... | a.cc: In function 'int main()':
a.cc:16:116: warning: overflow in conversion from 'double' to 'short int' changes value from '1.0e+9' to '32767' [-Woverflow]
16 | for (int i = 0; i < n; i++) { x[i].clear(); u[i] = false; for (int j = 0; j <= p; j++)dist[i][j] = 1e9; }
| ... |
s909803363 | p00897 | 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
| |
s567542374 | p00897 | C++ | #include<iostream>
#include<sstream>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define... | a.cc: In function 'int main()':
a.cc:39:20: error: 'class std::map<std::__cxx11::basic_string<char>, int>' has no member named 'cleaar'; did you mean 'clear'?
39 | id.cleaar(); sz = 0;
| ^~~~~~
| clear
|
s492710647 | p00897 | C++ | #define pb push_back
#define all(a) (a).begin(),(a).end()
#define f first
#define s second
#define foreach(it, c) for(__typeof__((c).begin()) it=(c).begin();it!=(c).end();it++)
#define MAX_V 8000
#define INF 100000000
using namespace std;
struct edge{int to, cost; };
typedef pair<int, int> P;
typedef pair<int,P>P... | a.cc:13:9: error: 'pair' does not name a type
13 | typedef pair<int, int> P;
| ^~~~
a.cc:14:9: error: 'pair' does not name a type
14 | typedef pair<int,P>P3;
| ^~~~
a.cc:18:1: error: 'string' does not name a type
18 | string dest;
| ^~~~~~
a.cc:19:1: error: 'vector' does not n... |
s680668174 | p00897 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstr... | cc1plus: error: '::main' must return 'int'
|
s366616566 | p00897 | C++ | #include<algorithm>
#include<queue>
#include<climits>
#include<map>
#include<set>
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define f first
#define s second
#define MAX_V 6000
#define INF (1<<29)
using namespace std;
struct edge{
int to,cost;
edge(int to,int cost):to(to),cost(cost){};
};
struct... | a.cc:60:5: error: 'string' was not declared in this scope
60 | map<string,int>id;
| ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
5 | #include<set>
+++ |+#include <string>
6 |
a.cc:60:15: error: template argument 1 is... |
s847518947 | p00897 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<climits>
#include<map>
#include<set>
#include<string>
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define f first
#define s second
#define MAX_V 6000
#define INF (1<<29)
using namespace std;
struct edge{
int to,cost;
... | a.cc:66:16: error: redefinition of 'std::map<std::__cxx11::basic_string<char>, int> id'
66 | map<string,int>id;
| ^~
a.cc:63:16: note: 'std::map<std::__cxx11::basic_string<char>, int> id' previously declared here
63 | map<string,int>id;
| ^~
a.cc:67:15: error: redefinitio... |
s194573462 | p00897 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<climits>
#include<map>
#include<set>
#include<atring>
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define f first
#define s second
#define MAX_V 6000
#define INF (1<<29)
using namespace std;
struct edge{
int to,cost;
... | a.cc:8:9: fatal error: atring: No such file or directory
8 | #include<atring>
| ^~~~~~~~
compilation terminated.
|
s485736343 | p00897 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<climits>
#include<map>
#include<set>
#include<string>
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define f first
#define s second
#define MAX_V 7000
#define INF (1<<29)
using namespace std;
struct edge{
int to,cost;
... | a.cc: In function 'int main()':
a.cc:68:5: error: 'v' was not declared in this scope
68 | v.clear(),from.clear(),to.clear();
| ^
a.cc:68:15: error: 'from' was not declared in this scope
68 | v.clear(),from.clear(),to.clear();
| ^~~~
a.cc:68:28: error: 'to' was not declared in... |
s689972460 | p00897 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<climits>
#include<map>
#include<set>
#include<string>
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define MAX_V 6000
#define INF (1<<29)
using namespace std;
struct edge{
int to,cost;
edge(int to,int cost):to(to),cost... | a.cc:66:15: error: redefinition of 'std::vector<std::__cxx11::basic_string<char> > from'
66 | vector<string>from,to;
| ^~~~
a.cc:62:15: note: 'std::vector<std::__cxx11::basic_string<char> > from' previously declared here
62 | vector<string>from,to;
| ^~~~
a.cc:66:20: error:... |
s265791243 | p00897 | C++ | #include<algorithm>
#include<queue>
#include<climits>
#include<map>
#include<set>
#include<string>
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define MAX_V 6000
#define INF (1<<29)
using namespace std;
struct edge{
int to,cost;
edge(int to,int cost):to(to),cost(cost){}
};
struct State{
int d,c... | a.cc: In function 'int main()':
a.cc:68:9: error: 'cin' was not declared in this scope
68 | while(cin >> n >> m >> c,n|m|c){
| ^~~
a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
6 | #include<string>
+++ |+#include <iostream... |
s060301018 | p00897 | C++ | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#i... | a.cc: In function 'int main()':
a.cc:111:52: error: expected ';' before 'while'
111 | dp[get_city_id(cities,src)][10*capacity] = true
| ^
| ;
112 |
113 | while(!que.empty()){
| ~~~~... |
s258048232 | p00897 | C++ | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#i... | a.cc: In function 'int main()':
a.cc:95:23: error: '__gnu_cxx::__alloc_traits<std::allocator<Node>, Node>::value_type' {aka 'class Node'} has no member named 'push_back'
95 | nodes[from_num].push_back(Node(to_num,dist));
| ^~~~~~~~~
a.cc:96:21: error: '__gnu_cxx::__alloc_traits<std:... |
s950053828 | p00898 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <cstring>
using namespace std;
class Node{
public:
int x, y, face, dir;
Node(int x, int y, int face, int dir) : x(x), y(y), face(face), dir(dir) {}
};
int dx[2][3] = { {1, -1, 0}, {1, 0, -1} };
int dy[2][3] = { {0, 0, 1}, {0, -1, 0} };
int next[20][... | a.cc: In function 'int main()':
a.cc:35:37: error: reference to 'next' is ambiguous
35 | int nface = next[face][(i+dir)%3];
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,... |
s897545739 | p00899 | Java | import java.util.Arrays;
import java.util.Scanner;
public class City_Merger {
public static void main(String[] args) {
solver();
}
static void solver() {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
if (n == 0)
return;
String[] s = new String[n];
for (int ... | Main.java:4: error: class City_Merger is public, should be declared in a file named City_Merger.java
public class City_Merger {
^
1 error
|
s122488178 | p00899 | Java | import java.util.Arrays;
import java.util.Scanner;
public class Main1006 {
Scanner scan = new Scanner(System.in);
String s[] = new String[20];
int [][] g = new int[20][20];
int [][] vis = new int[1 << 15][14];
int [][] d = new int[1 << 15][14];
//int [][] tp = new int[1 << 14][14];
int n;
int cao(int i, int j... | Main.java:5: error: class Main1006 is public, should be declared in a file named Main1006.java
public class Main1006 {
^
1 error
|
s448436289 | p00899 | Java | import java.util.Arrays;
import java.util.Scanner;
public class Main {
Scanner scan = new Scanner(System.in);
String s[] = new String[20];
int [][] g = new int[20][20];
int [][] vis = new int[1 << 14][14];
int [][] d = new int[1 << 14][14];
int [][] tp = new int[1 << 14][14];
int n;
int cao(int i, int j){
i... | Main.java:27: error: cannot find symbol
int ans = Ox7fffffff;
^
symbol: variable Ox7fffffff
location: class Main
Main.java:68: error: cannot find symbol
int ans = Ox7fffffff;
^
symbol: variable Ox7fffffff
location: class Main
2 errors
|
s703657406 | p00899 | C | #include <iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<cstring>
using namespace std;
int dist[20][20],dp[(1<<14)+40][18];
bool valid[20];
string S[20];
int n;
void update(int a,int b)
{
int i;
for(i=0;i<S[a].size();i++)
{
bool f=true;
if(S[a].size()-i>S[b].size())... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s048915189 | p00899 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int SSS(string a,string b){
int p=0;
if(a.size()>=b.size()){
for(int i=0;i<=a.size()-b.size();i++){
if(a.substr(i,b.size())==b){
return b.size();
}
}
}
for(int i=1;i<=b.size();i++){
if(i>a.size()){break;}
if(a.substr(a.s... | a.cc: In function 'int hantei()':
a.cc:22:17: error: 'c' was not declared in this scope
22 | int hantei(){if(c==26){return -1;}if(c==27){return 2;}if(c==36){return -1;}if(c==40){return 9;}if(c==43){return 3;}return 0;}
| ^
a.cc:22:38: error: 'c' was not declared in this scope
22 | int hantei... |
s226475921 | p00899 | C++ | #include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
inline void chmin(int& a, int b)
{
a = min(a, b);
}
int main()
{
int N;
string S[14];
int dp[1 << 14][14];
int match[14][14];
while(cin >> N, N) {
for(int i = 0; i < N; i++) {
cin >> S[i];
}
int ... | a.cc: In function 'int main()':
a.cc:43:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
43 | if(dp[i] == INF) continue;
| ~~~~~~^~~~~~
|
s859746121 | p00899 | C++ | /*
???????°??????°?????????????????????????????´????????´?????????????????¨??????????????????
???????????°?????????dp[2n][n]???????¬???????????????¨??????????????? 2 ?¬??????????????°????????????????
*/
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <bitset>
... | a.cc: In function 'int main()':
a.cc:16:22: error: 'll' was not declared in this scope
16 | #define rep(i,n) for(ll i=0;i<(n);i++)
| ^~
a.cc:46:17: note: in expansion of macro 'rep'
46 | rep(i, n) cin >> tmp[i];
| ^~~
a.cc:46:21: error: 'i' was not ... |
s403173659 | p00899 | C++ | #ifndef VS
#include<iostream>
#include<vector>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#include<string>
#include<assert.h>
#include<math.h>
#include<stdio.h>
#include<ctype.h>
#endif
using namespace std;
typedef long long LL;
#ifdef BTK
#define DEBUG if(1)
#els... | a.cc: In function 'int main()':
a.cc:156:2: error: expected '}' at end of input
156 | }
| ^
a.cc:112:12: note: to match this '{'
112 | int main() {
| ^
|
s921422498 | p00899 | C++ | #ifndef VS
#include<iostream>
#include<vector>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#include<string>
#include<assert.h>
#include<math.h>
#include<stdio.h>
#include<ctype.h>
#endif
using namespace std;
typedef long long LL;
#ifdef BTK
#define DEBUG if(1)
#els... | a.cc: In function 'int main()':
a.cc:202:20: error: ambiguous overload for 'operator<<' (operand types are 'output' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
202 | out<<ret[ret_len].size() << ln;
| ~~~^~~~~~~~~~~~~~~~~~~~~
| ... |
s828437901 | p00899 | C++ | #define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#defi... | a.cc: In function 'int main()':
a.cc:86:14: error: no matching function for call to 'chmin(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, long long unsigned int)'
86 | chmin(dp[i|1<<k][k], dp[i][j]+(s[k].size()-trans[j][k]));
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~... |
s381170442 | p00899 | C++ | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
sys.setrecursionlimit(1000000)
def hoge():
while True:
N = input()
if N == 0:
break
lst_input = []
lst = []
for i in range(N):
S = raw_input()
lst_inpu... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python
| ^
a.cc:57:14: error: invalid preprocessing directive #print
57 | #print DP[i][2 ** N - 1]
| ^~~~~
a.cc:3:1: error: 'from' does not name a type
3 | from collections import deque
| ^~~~
|
s696558713 | p00899 | 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
| |
s120842361 | p00899 | C++ | #include<string>
#include<vector>
#include<iostream>
// #include<algorithm>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
const int INF=1<<29;
// s ª t ðª¶ñƵÄÜީǤ©
bool contain(const string &s,const string &t){
int m=s.length(),n=t.length();
rep(i,m-n+1) if(s.substr(i,n)==t) ret... | a.cc: In function 'int main()':
a.cc:56:32: error: 'min_element' was not declared in this scope
56 | printf("%d\n",*min_element(dp[(1<<n)-1],dp[(1<<n)-1]+n));
| ^~~~~~~~~~~
|
s550726556 | p00899 | C++ | View Code
#include<iostream>
#include<cstring>
#include<cstdio>
#define N 15
#define inf 0x7fffffff
using namespace std;
int dp[1<<15][N];
char str[N][25];
int map[N][N];
int min(int a,int b)
{
return a<b?a:b;
}
bool get(int i,int j)
{
if(strcmp(str[i],str[j])==0)
return true;
int len... | a.cc:1:1: error: 'View' does not name a type
1 | View Code
| ^~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/u... |
s364694562 | p00899 | C++ | #include<iostream>
#include<cstdio>
#include<queue>
#include<stack>
#include<vector>
#include<cstring>
#include<string>
#include<set>
#include<map>
#include<cmath>
#include<algorithm>
using namespace std;
const int inf=100000000,maxn=16,maxm=1<<16;
char str[2][maxm][300];
int len[2][maxm];
#define MAXN 300
#define _... | a.cc:40:1: error: expected unqualified-id before '{' token
40 | {
| ^
|
s754315879 | p00900 | C | #include <iostream>
#include <cstring>
using namespace std;
int h, w;
char buf[20][20];
char mat[20][20];
int chest[20][20];
int adj[20][20];
void calcAdj() {
memset(adj, 0, sizeof(adj));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
for (int dx = -1; dx <= 1; dx++) {
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s426920823 | p00900 | C++ | 9 9
*********
*4*4*4*4*
*********
*4*4*4*4*
*********
*4*4*4*4*
*********
*4*4*4***
*********
0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 9 9
| ^
|
s181441138 | p00900 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define re(i,n,a) for(int i=a;i<n;i++)
using namespace std;
typedef pair<int,int>P;
int w,h,a[16][16],md=14,b[16][16],s1,s2;
bool used[16][16];
string s[16];
int dx[]={-1,-1,-1,0,0,0,1,1,1};
int dy[]={-1,0,1,-1,0,1,-1,0,1};
vector<P>v;
map<int,int>m;
int greed... | a.cc: In function 'int main()':
a.cc:102:11: error: 'If' was not declared in this scope
102 | If(st.count(ans)&&ans%md==0)
| ^~
|
s015502420 | p00900 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define re(i,n,a) for(int i=a;i<n;i++)
using namespace std;
typedef pair<int,int>P;
int w,h,a[16][16],md=14,b[16][16],s1,s2;
bool used[16][16];
string s[16];
int dx[]={-1,-1,-1,0,0,0,1,1,1};
int dy[]={-1,0,1,-1,0,1,-1,0,1};
vector<P>v;
map<int,int>m;
int greed... | a.cc: In function 'int main()':
a.cc:106:24: error: expected ';' before 'l'
106 | }if(ans==28)exit(1)l
| ^
| ;
|
s362518939 | p00900 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define re(i,n,a) for(int i=a;i<n;i++)
using namespace std;
typedef pair<int,int>P;
int w,h,a[16][16],md=14,b[16][16],s1,s2;
bool used[16][16];
string s[16];
int dx[]={-1,-1,-1,0,0,0,1,1,1};
int dy[]={-1,0,1,-1,0,1,-1,0,1};
vector<P>v;
map<int,int>m;
int greed... | a.cc: In function 'int main()':
a.cc:109:2: error: expected '}' at end of input
109 | }
| ^
a.cc:77:11: note: to match this '{'
77 | int main(){
| ^
|
s843125096 | p00900 | C++ | #include<cstdio>
#include<vector>
#include<algorithm>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
const int dx[]={1,1,0,-1,-1,-1,0,1,0},dy[]={0,-1,-1,-1,0,1,1,1,0};
int h,w;
char B[15][16];
bool bomb[15][15],ban[15][15];
struct P{ int x,y; };
vector<P> num;
vector<int> subs... | a.cc: In function 'int main()':
a.cc:100:20: error: 'strcmp' was not declared in this scope
100 | && strcmp(B[0],"*********")==0
| ^~~~~~
a.cc:4:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorit... |
s028429136 | p00900 | C++ | #include<cstdio>
#include<vector>
#include<algorithm>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
const int INF=1<<29;
const int dx[]={1,1,0,-1,-1,-1,0,1,0},dy[]={0,-1,-1,-1,0,1,1,1,0};
int h,w;
char B[15][16];
bool bomb[15][15],ban[15][15];
struct P{ int x,y; };
vector<P> n... | a.cc: In function 'int main()':
a.cc:118:20: error: 'strcmp' was not declared in this scope
118 | && strcmp(B[0],"*********")==0
| ^~~~~~
a.cc:4:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorit... |
s127174141 | p00900 | C++ | #include<iostream>
#include<algorithm>
#include<map>
#include<cassert>
using namespace std;
#define rep(i,n) for ( int i = 0; i < n; i++)
#define MAX 15
#define INF (1<<29)
static const int di[9] = {0, 0, -1, -1, -1, 0, 1, 1, 1};
static const int dj[9] = {0, 1, 1, 0, -1, -1, -1, 0, 1};
long long T[17];
int size;
cla... | a.cc: In function 'int dfs(State&)':
a.cc:56:10: error: reference to 'size' is ambiguous
56 | rep(i, size){
| ^~~~
a.cc:7:39: note: in definition of macro 'rep'
7 | #define rep(i,n) for ( int i = 0; i < n; i++)
| ^
In file included from /usr/include/c+... |
s804561022 | p00900 | C++ | //Author?¥CY
//School: CUST
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<vector>
#include<cmath>
#include<stdlib.h>
#include<iomanip>
#include<list>
#include<deque>
#include<map>
#include <stdio.h>
#include <deque>
#define inf 1<<30
using namespace std;
#define maxn 18
char str[m... | a.cc:102:5: error: expected initializer before '_used'
102 | _used[x][y]=1;
| ^~~~~
a.cc:105:11: error: expected constructor, destructor, or type conversion before '(' token
105 | memset(tree,-1,sizeof(tree));
| ^
a.cc:106:5: error: expected unqualified-id before 'for'
106 | ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.