submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s173860052 | p01771 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long int64;
vector< vector< int > > graph;
struct SegmentTree
{
vector< int64 > data, add;
int sz;
SegmentTree(int n)
{
sz = 1;
while(sz < n) sz <<= 1;
data.assign(2 * sz - 1, 0);
add.assign(2 * sz - 1, 0);
}
inline void Push(... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:6:1: error: extended character is not valid in an identifier
6 |
| ^
a.cc:9:1: error: extended character is not valid in an identifier
9 | vector< int64 > data, add;
| ^
a.cc:9:1: error: extended cha... |
s986662119 | p01771 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long int64;
vector< vector< int > > graph;
struct SegmentTree
{
vector< int64 > data, add;
int sz;
SegmentTree(int n)
{
sz = 1;
while(sz < n) sz <<= 1;
data.assign(2 * sz - 1, 0);
add.assign(2 * sz - 1, 0);
}
inline void Push(... | a.cc:2:1: error: extended character is not valid in an identifier
2 |
| ^
a.cc:6:1: error: extended character is not valid in an identifier
6 |
| ^
a.cc:9:1: error: extended character is not valid in an identifier
9 | vector< int64 > data, add;
| ^
a.cc:9:1: error: extended cha... |
s870578397 | p01772 | C | #include <stdio.h>
#include <string.h>
int main(void) {
int i;
char s[21];
char *p;
int cnt;
scanf("%s", s, &len);
p = s;
cnt = 0;
while (1) {
p = strchr(p, 'A');
if (p == NULL)
break;
p = strchr(p, 'Z');
if (p == NULL)
break;
cnt++;
}
if (!cnt)
puts("-1");
else {
for (i = 0; i < cnt;... | main.c: In function 'main':
main.c:10:25: error: 'len' undeclared (first use in this function)
10 | scanf("%s", s, &len);
| ^~~
main.c:10:25: note: each undeclared identifier is reported only once for each function it appears in
|
s748046420 | p01772 | C++ | #include<iostream>
using namespace std;
int main(){
char input[21];
int i = 0;
int b = 0;
int check = 0;
cin >> input
i = 0; b = 0; check = 0;
while(1){
if(b == 0 && input[i] == 'A' && input[i+1] == 'Z'){
cout << input[i];
b = 1;
check = 1;
}else if(b == 1 && input[i] == 'Z'){
cout << ... | a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before 'i'
10 | cin >> input
| ^
| ;
11 | i = 0; b = 0; check = 0;
| ~
|
s851347215 | p01772 | C++ | #include<iostream>
#include<cmath>
#include<vector>
#include<string>
typedef unsigned long long ull;
#define rep(i,a) for(int i=0;i<a;i++)
#define loop(i,a,b) for(int i=a;i<b;i++)
using namespace std;
const double eps = 1e-10;
const double pi = acos(-1);
const double inf = (int)1e8;
void solve(){
string s;int state=... | a.cc: In function 'void solve()':
a.cc:20:14: error: operands to '?:' have different types 'int' and 'const char*'
20 | cout<<(used?-1:"")<<endl;
| ~~~~^~~~~~
|
s045824994 | p01772 | C++ | #include<iostream>
int main(){
string s,t;cin>>s;
int cnt=0,i=0;
while(i<s.size()){
if(cnt&1)if(s[i]=='Z')cnt++;
else if(s[i]=='A')cnt++;
}
cnt/=2;
if(cnt==0)cout<<-1;
else{
while(cnt--)cout<<"AZ";
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:3:1: error: 'string' was not declared in this scope
3 | string s,t;cin>>s;
| ^~~~~~
a.cc:3:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostr... |
s129682345 | p01772 | C++ | #include<iostream>
using namespace std;
int main(){
string s,t;cin>>s;
int cnt=0,i=0;
while(i<s.size()){
if(cnt&1)if(s[i]=='Z')cnt++;
else if(s[i]=='A')cnt++;
}
cnt/=2;
if(cnt==0)cout<<-1;
else{
while(cnt--)cout<<"AZ";
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s457634609 | p01772 | C++ | c,n;main(){while((c=getchar())!=10)n+=(n&1)?(c==90):(c==65);if(n/=2){while(n--)printf("AZ");puts("");}else puts("-1");return 0;} | a.cc:1:1: error: 'c' does not name a type
1 | c,n;main(){while((c=getchar())!=10)n+=(n&1)?(c==90):(c==65);if(n/=2){while(n--)printf("AZ");puts("");}else puts("-1");return 0;}
| ^
a.cc:1:5: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | c,n;main(){while((c=getchar())!=10)n+... |
s158535419 | p01772 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
string s;
bool f=false,b=false;
cin>>s;
for(int i=0;i<s.length();i++){
if(!f&&s[i]=='A') f=!f;
else if(f&&s[i]=='Z'){cout<<"AZ";b=true;f=!f}
}
if(!b)cout<<-1;
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:11:61: error: expected ';' before '}' token
11 | else if(f&&s[i]=='Z'){cout<<"AZ";b=true;f=!f}
| ^
| ;
|
s777269085 | p01772 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string row;
int ac=0;
int azc=0;
cin>>row;
for(int i=0;i<(int)row.size();i++){
char ch=row[i];
}
for(int i=0;i<(int)row.size();i++){
if(row[i]=='Z'&&ac==0)continue;
if(row[i]=='A'){
ac++;
}
if(row[i]=='Z'&&ac>0&&f==1){
... | a.cc: In function 'int main()':
a.cc:19:27: error: 'f' was not declared in this scope
19 | if(row[i]=='Z'&&ac>0&&f==1){
| ^
|
s244304472 | p01775 | C++ | v#include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#inclu... | a.cc:1:2: error: stray '#' in program
1 | v#include <functional>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <functional>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/... |
s222821414 | p01775 | C++ | #include <algorithm>
#include <functional>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <cl... | a.cc: In function 'int dijk()':
a.cc:69:12: error: 'd' was not declared in this scope
69 | if(d[s.v][s.bit1][s.bit2]<s.cost) continue;
| ^
|
s213772347 | p01775 | C++ | #include<iostream>
#include<vector>
#include<queue>
#include<functional>
#include<algorithm>
using namespace std;
#define INF 1LL<<60
#define MAX_N 2000
#define MAX_COMB 729
#define MAX_K 6
#define BLACK 2
#define GRAY 1
#define WHITE 0
vector<pair<long long, long long>>x[MAX_N];
long long n, m, K, p, a, b, c;
long ... | a.cc: In function 'long long int dijkstra()':
a.cc:47:43: error: 'k' was not declared in this scope
47 | for (int i = 0; i < power[k]; i++) {
| ^
|
s646590122 | p01777 | C++ | #include <vector>
#include <iostream>
#include <queue>
#include <cassert>
#include <tuple>
using namespace std;
typedef long long ll;
template<class D, int S>
struct WaveletTree {
static const int N = 1<<S;
typedef pair<D, int> P;
int n;
P x[N];
int d[S+1][N];
int lc[S][N];
void built(int... | a.cc: In instantiation of 'void WaveletTree<D, S>::init(int) [with D = int; int S = 17]':
a.cc:97:12: required from here
97 | st.init(n);
| ~~~~~~~^~~
a.cc:39:13: error: 'sort' was not declared in this scope; did you mean 'short'?
39 | sort(x, x+n);
| ~~~~^~~~~~~~
| ... |
s689079285 | p01777 | C++ |
struct SuccinctIndexableDictionary
{
size_t length;
size_t blocks;
vector< unsigned > bit, sum;
SuccinctIndexableDictionary()
{
}
SuccinctIndexableDictionary(size_t _length)
{
length = _length;
blocks = (length + 31) >> 5;
bit.assign(blocks, 0U);
sum.assign(blocks, 0U);
}
void... | a.cc:4:3: error: 'size_t' does not name a type
4 | size_t length;
| ^~~~~~
a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
+++ |+#include <cstddef>
1 |
a.cc:5:3: error: 'size_t' does not name a type
5 | size_t blocks;
| ... |
s276307086 | p01779 | C++ | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
ty... | a.cc: In function 'int main()':
a.cc:77:12: error: conflicting declaration 'double x'
77 | double x = (double)ok/(double)sum*1000;
| ^
a.cc:33:10: note: previous declaration as 'char x [105][25]'
33 | char x[105][25];
| ^
a.cc:78:18: error: no matching function for call to ... |
s042044910 | p01779 | C++ | #include <cctype>
#include <vector>
#include <string>
#include <iostream>
using namespace std;
char S[111][22]; int T[111], P[111];
int main()
{
int N, H, Q = 0, R = 0; scanf("%d%d", &N, &H);
for(int i = 0; i < N; i++)
{
scanf("%s%d", S[i], &T[i]);
}
char F[2];
for(int ... | a.cc: In function 'int main()':
a.cc:25:22: error: 'strlen' was not declared in this scope
25 | while(ptr != strlen(S[i]))
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <iostream>
+++ |... |
s104308889 | p01779 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<iomanip>
using namespace std;
#define MAX_N 10000
string S[MAX_N];
int pass[MAX_N];
int miss[MAX_N];
int over[MAX_N];
int misscnt, totalcnt;
int n, m;
int cnt1;
char a[2];
void hantei(int c, string S, int p, char v) {
if (S[p] == v || abs(S[p] - v) == 32)... | a.cc: In function 'int main()':
a.cc:43:51: error: invalid conversion from 'char*' to 'char' [-fpermissive]
43 | hantei(cnt1, S[cnt1], pass[cnt1], a);
| ^
| |
| ... |
s774782067 | p01779 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<iomanip>
using namespace std;
#define MAX_N 10000
string S[MAX_N];
int pass[MAX_N];
int miss[MAX_N];
int over[MAX_N];
int misscnt, totalcnt;
int n, m;
char a;
void hantei(int c, string T, int p, char v) {
if (T[p] == v || abs(T[p] - v) ==... | a.cc: In function 'void hantei(int, std::string, int, char)':
a.cc:23:26: error: 'cnt1' was not declared in this scope
23 | if (miss[cnt1] > over[cnt1]) { m--; }
| ^~~~
|
s873233852 | p01779 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<iomanip>
#include<cctype>
using namespace std;
#define MAX_N 10000
string S[MAX_N];
int pass;
int miss[MAX_N];
int over[MAX_N];
int misscnt, totalcnt;
int n, m;
char a;
void hantei(int c, string T, int p, char v) {
if (tolower(v) == tolow... | a.cc: In function 'void hantei(int, std::string, int, char)':
a.cc:20:63: error: invalid types 'int[int]' for array subscript
20 | if (tolower(v) == tolower(T[p])) { S[c][p] = '_'; pass[c]++; }
| ^
|
s132397557 | p01779 | C++ | #include<bits.stdc++.h>
using namespace std;
string S[999],a,i;
int pass,miss[999],over[999];,misscnt,totalcnt,n,m;
int main(){
cin>>n>>m;
for(i=0;i<n;i++){
cin>>S[i]>>over[i];
}
for(i=0;i<n;i++){
pass=0;
while(pass!=S[i].size()){
cout<<"? "<<S[i]<<endl;
cin>>a;
totalcnt++;
if(tolower(a[0])==tolow... | a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory
1 | #include<bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s821879163 | p01779 | C++ | #include<bits/stdc++.h>
using namespace std;
string S[999],a,i;
int pass,miss[999],over[999];,misscnt,totalcnt,n,m;
int main(){
cin>>n>>m;
for(i=0;i<n;i++){
cin>>S[i]>>over[i];
}
for(i=0;i<n;i++){
pass=0;
while(pass!=S[i].size()){
cout<<"? "<<S[i]<<endl;
cin>>a;
totalcnt++;
if(tolower(a[0])==tolow... | a.cc:4:30: error: expected unqualified-id before ',' token
4 | int pass,miss[999],over[999];,misscnt,totalcnt,n,m;
| ^
a.cc:4:38: error: expected constructor, destructor, or type conversion before ',' token
4 | int pass,miss[999],over[999];,misscnt,totalcnt,n,m;
| ... |
s910005691 | p01779 | C++ | #include<bits/stdc++.h>
using namespace std;
string S[999],a,i;
int pass,miss[999],over[999],misscnt,totalcnt,n,m;
int main(){
cin>>n>>m;
for(i=0;i<n;i++){
cin>>S[i]>>over[i];
}
for(i=0;i<n;i++){
pass=0;
while(pass!=S[i].size()){
cout<<"? "<<S[i]<<endl;
cin>>a;
totalcnt++;
if(tolower(a[0])==tolowe... | a.cc: In function 'int main()':
a.cc:7:15: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
7 | for(i=0;i<n;i++){
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/... |
s994335882 | p01780 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
typedef long long ll;
int N;
vector< pair<int, int> > E[101010];
class LCA {
public:
int V, logV;
vector<ll> depth, len;
vector<vector<ll> > parent;
LCA(int V) {
this->V = V;
logV = 0;
while (V > (1LL << logV)) logV++;
... | a.cc: In constructor 'LCA::LCA(int)':
a.cc:19:44: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'std::vector<int>')
19 | this->depth = vector<int>(V);
| ^
In file included from /usr/include/c++/14/vector:72,
... |
s597751851 | p01780 | C++ | #include<bits/stdc++.h>
using namespace std;
int N;
vector< vector< int > > graph;
struct CentroidPathDecomposition
{
struct Centroid
{
int ParIndex, ParDepth, Deep;
vector< int > node;
inline int size()
{
return(node.size());
}
inline int &operator[](int k)
{
return(node[k... | a.cc:127:1: error: ISO C++ forbids declaration of 'dist' with no type [-fpermissive]
127 | CentroidPathDecomposition::dist(int a, int b)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
|
s916483867 | p01780 | C++ | #include <iostream>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;
bool seached[100005];
int inf=99999999;
int N,sum=0,maxdis=-1,dp[1000][1000],ans=0;
struct Vertex
{
Vertex(){par=NULL;}
int id,dis;
Vertex *par;
vector<Vertex*> e;
}*head=NULL,*info=NULL;
void find(Vertex *x,int &val)
{
... | a.cc: In function 'int main()':
a.cc:58:9: error: 'memset' was not declared in this scope
58 | memset(dp,0x11,sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++ |+#include <cstri... |
s106964924 | p01780 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<cassert>
#include<cstring>
#include<climits>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<deque>
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
using namespace std;
#define MAX 1000010
#define IINF INT_MA... | a.cc: In function 'void compute()':
a.cc:144:16: error: 'll' was not declared in this scope
144 | answer += (ll)( (ll)abs(score[s]-score[node]) + (ll)abs(score[node]-score[t]) );
| ^~
a.cc:144:25: error: expected ')' before 'abs'
144 | answer += (ll)( (ll)abs(score[s]-score[node]) + (ll... |
s192374550 | p01780 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<cassert>
#include<cstring>
#include<climits>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<deque>
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
using namespace std;
#define MAX 200010
#define IINF INT_MAX... | a.cc: In function 'void compute()':
a.cc:144:16: error: 'll' was not declared in this scope
144 | answer += (ll)( (ll)abs(score[s]-score[node]) + (ll)abs(score[node]-score[t]) );
| ^~
a.cc:144:25: error: expected ')' before 'abs'
144 | answer += (ll)( (ll)abs(score[s]-score[node]) + (ll... |
s477959712 | p01782 | C++ | #include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
typedef vector< int > vi;
vi operator+(const vi &t, const vi &s)
{
vi ret(52);
for(int i = 0; i < 52; i++) ret[i] = t[i] + s[i];
return (ret);
}
vi operator-(const vi &t)
{
vi ret(52);
for(int i = 0; i < 52; i++) ret[i] = t[i] * -1;
... | a.cc: In function 'int main()':
a.cc:126:16: error: expected '}' at end of input
126 | cout << endl;
| ^
a.cc:102:1: note: to match this '{'
102 | {
| ^
|
s254935205 | p01783 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<str... | a.cc: In function 'std::pair<std::__cxx11::basic_string<char>, bool> solve(int, int)':
a.cc:69:70: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
69 | ... |
s832456914 | p01784 | C | #include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
char a[201][201];
int n;
scanf("%d",&n);
getchar();
for(int i=0;i<n;i++)
gets(a[i]);
int t=0,flag=0;
for(int i=0;i<n;i++)
{
int m=strlen(a[i]);
for(int j=0;j<m;j++)
{
if(a[i][j]=='(')
t++;
else if(a[i][j]==')')
t--;
if(... | main.c:3:1: error: unknown type name 'using'
3 | using namespace std;
| ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
3 | using namespace std;
| ^~~
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did ... |
s871863737 | p01784 | C | #include<iostream>
#include<cstring>
#include<stack>
#include<cstring>
using namespace std;
const int MAXN=1000;
char map[MAXN][MAXN];
int main()
{
int n;
int flag=1;
stack<char> stk;
cin>>n;
for(int i=0;i<n;i++)
cin>>map[i];
for(int i=0;i<n;i++)
{
for(int j=0;j<MAXN;j++)
{
if(map[i][j]=='(')
s... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s258431892 | p01784 | C | #include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
string a;
char b[101][101];
int n;
cin>>n;
getchar();
for(int i=0;i<n;i++)
{
getline(cin,a,'\n');
for(int j=0;j<a.size();j++)
b[i][j]=a[j];
}
int t=0,flag=0;
for(int i=0;i<n;i++)
{
for(int j=0;j<101;j++)
{
... | main.c:2:9: fatal error: iostream: No such file or directory
2 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s671431353 | p01784 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
char a[201][201];
int n;
cin>>n;
getchar();
for(int i=0;i<n;i++)
gets(a[i]);
int t=0,flag=0;
for(int i=0;i<n;i++)
{
int m=strlen(a[i]);
for(int j=0;j<m;j++)
{
if(a[i][j]=='(')
t++;
else if(a[i][j]==')')
t-... | a.cc: In function 'int main()':
a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(a[i]);
| ^~~~
| getw
|
s043144419 | p01784 | C++ | #include<iostream>
#include<stdio.h>
#include<cstring>
using namespace std;
int main()
{
char a[201][201];
int n;
cin>>n;
getchar();
for(int i=0;i<n;i++)
gets(a[i]);
int t=0,flag=0;
for(int i=0;i<n;i++)
{
int m=strlen(a[i]);
for(int j=0;j<m;j++)
{
if(a[i][j]=='(')
t++;
else if(a[i][j]==')')
t... | a.cc: In function 'int main()':
a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(a[i]);
| ^~~~
| getw
|
s561177847 | p01784 | C++ | #include<iostream>
#include<cstring>
#include<cstdio>
#include<string>
using namespace std;
int main()
{
int n,sum1=0,sum2=0,flog=0;
cin>>n;
getchar();
while(n--)
{
char s[105];
gets(s);
int len=strlen(s);
for(int i=0;i<len;i++)
{
if(s[i]=='(') sum1++;
if(s[i]==')')
{
sum2++;
if(sum1<sum... | a.cc: In function 'int main()':
a.cc:14:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
14 | gets(s);
| ^~~~
| getw
|
s132508242 | p01784 | C++ | #include<iostream>
#include<cstring>
#include<cstdio>
#include<string>
using namespace std;
int main()
{
int n,sum1=0,sum2=0,flog=0;
cin>>n;
getchar();
while(n--)
{
char s[105];
gets(s);
int len=strlen(s);
for(int i=0;i<len;i++)
{
if(s[i]=='(') sum1++;
if(s[i]==')')
{
sum2++;
if(sum1<sum... | a.cc: In function 'int main()':
a.cc:14:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
14 | gets(s);
| ^~~~
| getw
|
s210169448 | p01784 | C++ | #include<iostream>
#include<algorithm>
#include<stdio.h>
#include<cstring>
using namespace std;
#define MAX 101
int strval[MAX];
int main(){
//freopen("input.txt","r",stdin);
int n;
char a[101];
while(~scanf("%d",&n)){
memset(strval,0,sizeof(strval));
for(int i=0;i<n;i++){
gets(a);
... | a.cc: In function 'int main()':
a.cc:18:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
18 | gets(a);
| ^~~~
| getw
|
s494562172 | p01784 | C++ | #include<cstdio>
#include<stack>
using namespace std;
char s[11000] = "()";int n;char ss[105];
bool is_match(const string &str)
{
size_t len = str.length();
stack<char> s;
int i;
int cnt = 0;
for (i = 0; i < len; ++i) {
if (str[i] == '(') {
s.push(str[i]);
++cnt;
... | a.cc:5:21: error: 'string' does not name a type; did you mean 'stdin'?
5 | bool is_match(const string &str)
| ^~~~~~
| stdin
a.cc: In function 'bool is_match(const int&)':
a.cc:7:22: error: request for member 'length' in 'str', which is of non-class type 'const in... |
s772394605 | p01784 | C++ | #include<cstdio>
#include<stack>
#include<cstring>
using namespace std;
char s[11000] = "()";int n;char ss[105];
bool is_match(const string &str)
{
size_t len = str.length();
stack<char> s;
int i;
int cnt = 0;
for (i = 0; i < len; ++i) {
if (str[i] == '(') {
s.push(str[i]);
... | a.cc:6:21: error: 'string' does not name a type; did you mean 'stdin'?
6 | bool is_match(const string &str)
| ^~~~~~
| stdin
a.cc: In function 'bool is_match(const int&)':
a.cc:8:22: error: request for member 'length' in 'str', which is of non-class type 'const in... |
s005740591 | p01784 | C++ | #include <iostream>
#include <vector>
#include <climits>
#include <queue>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
vector<string> s(n);
for (int i = 0; i < n; ++i) cin >> s[i];
vector<pair<int, int>> v(n);
for (int i = 0; i < n; ++i) {
int tmp = 0;
for (int j = 0; j < s[i].size(... | a.cc: In function 'int main()':
a.cc:62:9: error: 'sort' was not declared in this scope; did you mean 'short'?
62 | sort(x.begin(), x.end());
| ^~~~
| short
a.cc:63:9: error: 'reverse' was not declared in this scope
63 | reverse(x.begin(), x.end());
| ^~~~... |
s068191711 | p01786 | C++ | #include<bits/stdc++.h>
using namespace std;
#pragma warning(disable:4996)
//FILE *in = freopen("input.txt", "r", stdin);
int H, W, X, Y, tate[600][600], yoko[600][600], dp[600][600][2][2], dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 };
struct State { int s1, s2, s3, s4; };
bool operator<(State u1, State u2) {
if (u1.s1 ... | a.cc: In function 'int main()':
a.cc:47:49: error: 'eord' was not declared in this scope
47 | __asm__ volatile("mov %%rsp, %0" : "=r"(eord));
| ^~~~
a.cc:48:50: error: 'enew' was not declared in this scope
48 | __asm__ volatile("mov %0, %%rsp" ... |
s585020876 | p01787 | C++ | #include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <ctype.h>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <limits.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int N = 1000+10;
int ai, bi... | a.cc: In function 'bool dfs(int, int)':
a.cc:30:25: error: reference to 'begin' is ambiguous
30 | begin = a[x].y - c[t].y;
| ^~~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s777191583 | p01787 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using Ti = tuple<int, int, int>;
using Tl = tuple<ll, ll, ll>;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
#define Get(t... | a.cc: In function 'int main()':
a.cc:78:15: error: 'j' was not declared in this scope
78 | cout << A[j].F << " " << A[j].S << " ";
| ^
|
s995256365 | p01795 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
const int mod = 1000000009;
struct Mod {
public:
int num;
Mod() : Mod(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) {
static_assert(mod<INT_MAX / 2, "mod is too big, please ma... | a.cc:123:35: error: template argument 1 is invalid
123 | Mod getans(map<int,int>mp,int rest) {
| ^
a.cc:123:35: error: template argument 2 is invalid
a.cc:123:37: error: expected unqualified-id before '{' token
123 | Mod getans(map<int,int>mp,int rest) {
| ... |
s572279427 | p01795 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
const int mod = 1000000009;
struct Mod {
public:
int num;
Mod() : Mod(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) {
static_assert(mod<INT_MAX / 2, "mod is too big, please ma... | 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 'bool __gnu_cxx::__ops::_Ite... |
s578365631 | p01795 | C++ | #include "bits/stdc++.h"
using namespace std;
const int mod = 1000000009;
struct Mod {
public:
int num;
Mod() : Mod(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) {
static_assert(mod<INT_MAX / 2, "mod is too big, please make num 'long long int' from 'int'");
}
Mod(int n) : Mod(static_cast<long long... | 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 'bool __gnu_cxx::__ops::_Ite... |
s692986910 | p01795 | C++ | #include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
typedef long long ll;
inline char nc(){
static char buf[100000],*p1=buf,*p2=buf;
if (p1==p2) { p2=(p1=buf)+fread(buf,1,100000,stdin); if (p1==p2) return EOF; }
return *p1++;
}
inline void read(int &x){
char c=nc(),b=1;
for (;!(c>='... | a.cc: In function 'int Merge(int, int)':
a.cc:34:7: error: reference to 'rank' is ambiguous
34 | if (rank[x]>rank[y]) swap(x,y);
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/... |
s448631893 | p01795 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int N,M;
ll F[3000005];
ll T3[1000005];
ll T2[1000005];
const ll mod = 1000000009LL;
ll extgcd(ll a, ll b, ll &x, ll &y){
ll g = a;
x = 1;
y = 0;
if(b != 0){
g = extgcd(b, a%b, y, x);
y -= (a / b) * x;
}
return g;
}
ll modinv(ll a... | a.cc: In function 'int main()':
a.cc:123:30: error: too few arguments to function 'll mult(ll, ll)'
123 | xros = mult( xros, mult( mult( F[num], T3[num/3LL] ) ) );
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:73:4: note: declared here
73 | ll mult( ll a, ll b ){
| ^~~~
|
s813713621 | p01800 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
/* ??????????????¬ */
#include <complex>
typedef long double ld;
typedef complex<ld> Point;
#defin... | a.cc: In function 'bool check(ld)':
a.cc:620:35: error: 'faalse' was not declared in this scope
620 | if (ls.size() <= 0)return faalse;
| ^~~~~~
|
s611018134 | p01802 | Java | import java.util.Scanner;
public class ACM2 {
public static double distance(double d,double plan) {
double y,min=101.0,tmp=0.0;
int i;
for(i=0;i<(int)d;i++) {
y = d-i;
tmp = Math.sqrt(Math.pow(y, 2.0)+Math.pow(i, 2.0));
tmp -= plan;
tmp = Math.abs(tmp);
if(tmp<min) {
min = tmp;
... | Main.java:3: error: class ACM2 is public, should be declared in a file named ACM2.java
public class ACM2 {
^
1 error
|
s750957330 | p01802 | Java | import java.util.Scanner;
public class ACM2 {
public static double distance(double d,double plan) {
double y,min=101.0,tmp=0.0;
int i;
for(i=0;i<(int)d;i++) {
y = d-i;
tmp = Math.sqrt(Math.pow(y, 2.0)+Math.pow(i, 2.0));
tmp -= plan;
tmp = Math.abs(tmp);
if(tmp<min) {
min = tmp;
... | Main.java:3: error: class ACM2 is public, should be declared in a file named ACM2.java
public class ACM2 {
^
1 error
|
s173792110 | p01802 | C | include<stdio.h>
#include<math.h>
int main(){
int D,E;
double min;
int i,j;
while(scanf("%d%d",&D,&E),D+E){
min=fabs(sqrt(D*D)-E);
for(i=0,j=D;j>=0;i++,j--)
if( min > fabs((sqrt(i*i+j*j)-E)) )
min=(sqrt(i*i+j*j)-E);
printf("%.10f\n",min);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
8 | while(scanf("%d%d",&D,&E),D+E){
| ^~~~~
main.c:... |
s345926120 | p01802 | C++ | #include <cmath>
#include <cstdio>
#include <algorithm>
int D, E;
int main() {
while (scanf("%d%d", &D, &E), D) {
double ret = 1e10;
for (int i = 0; i <= D; i++) ret = std::min(ret, abs(hypot(i, D - i) - E));
printf("%.9f\n", ret);
}
} | a.cc: In function 'int main()':
a.cc:8:60: error: no matching function for call to 'min(double&, int)'
8 | for (int i = 0; i <= D; i++) ret = std::min(ret, abs(hypot(i, D - i) - E));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included f... |
s269030053 | p01802 | C++ | #include <cmath>
#include <cstdio>
#include <algorithm>
int D, E;
int main() {
while (scanf("%d%d", &D, &E), D) {
double ret = 1e10;
for (int i = 0; i <= D; i++) ret = std::min(ret, abs(hypot(1.0 * i, 1.0 * D - i) - E));
printf("%.9f\n", ret);
}
} | a.cc: In function 'int main()':
a.cc:8:60: error: no matching function for call to 'min(double&, int)'
8 | for (int i = 0; i <= D; i++) ret = std::min(ret, abs(hypot(1.0 * i, 1.0 * D - i) - E));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s274504716 | p01802 | C++ | dfsofjsdf | a.cc:1:1: error: 'dfsofjsdf' does not name a type
1 | dfsofjsdf
| ^~~~~~~~~
|
s896494994 | p01802 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <map>
using namespace std;
int main(){
int d, e;
while (1){
cin >> d >> e;
double min = 100000;
if (d == 0 && e == 0) break;
for (int i = 0; i <= d; i++){
for (int j = i; j <= d; j++){
if (i + j == d){
double cost = sqrt(i*i + j*j)... | a.cc: In function 'int main()':
a.cc:17:55: error: 'sqrt' was not declared in this scope
17 | double cost = sqrt(i*i + j*j);
| ^~~~
|
s261656141 | p01802 | C++ | #include<iostream>
#include<cmath>
using namespace std;
double Abv(double a,double b){
double Abv =a-b;
if(Abv<0){
Abv =b-a;
}
if(Abv>0){
Abv =a-b;
}
return Abv;
}
int main(){
double D,E;
while(1){
cin >> D >> E;
if(D==0&&E==0){
return 0;
}
for(int i=0;i<D;i++){
double A;
... | a.cc: In function 'int main()':
a.cc:29:9: error: expected primary-expression before 'double'
29 | Abv(double sqrt(A),E);
| ^~~~~~
|
s224237268 | p01802 | C++ | #include<iostream>
#include<cmath>
using namespace std;
double Abv(double a,double b){
double Abv =a-b;
if(Abv<0){
Abv =b-a;
}
if(Abv>0){
Abv =a-b;
}
return Abv;
}
int main(){
double D,E;
while(1){
cin >> D >> E;
if(D==0&&E==0){
return 0;
}
for(int i=0;i<D;i++){
double A;
... | a.cc: In function 'int main()':
a.cc:27:7: error: expected primary-expression before 'double'
27 | A=double sqrt(i*i+(D-i)*(D-i));
| ^~~~~~
|
s831662773 | p01802 | C++ | #include<iostream>
#include<cmath>
#include<string>
using namespace std;
double Abv(double a,double b){
double Abv =a-b;
if(Abv<0){
Abv =b-a;
}
if(Abv>0){
Abv =a-b;
}
return Abv;
}
int main(){
string gomi=" ";
double D,E;
while(1){
cin >> D >> gomi >> E;
if(D==0&&E==0){
break;
}... | a.cc: In function 'int main()':
a.cc:31:13: error: 'setprecision' was not declared in this scope
31 | cout << setprecision(10) << Abv(sqrt(A),E) << endl;
| ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
... |
s141531587 | p01802 | C++ | #include <cstdio>
#include <algorithm>
#include <math>
#include <map>
using namespace std;
int main()
{
double d, e;
double mp[105][105];
int i, j;
double dis;
double dd;
for (i = 0; i < 101; i++){
for (j = 0; j < 101; j++){
mp[i][j] = sqrt(pow(i, 2.0) + pow(j, 2.0));
}
}
i = j = 0;
while(scanf("%lf... | a.cc:3:10: fatal error: math: No such file or directory
3 | #include <math>
| ^~~~~~
compilation terminated.
|
s438858404 | p01802 | C++ | #include <cstdio>
#include <algorithm>
#include <math>
#include <map>
using namespace std;
int main()
{
double d, e;
double mp[105][105];
int i, j;
double dis;
double dd;
for (i = 0; i < 101; i++){
for (j = 0; j < 101; j++){
mp[i][j] = sqrt(pow(i, 2.0) + pow(j, 2.0));
}
}
i = j = 0;
while(scanf("%lf... | a.cc:3:10: fatal error: math: No such file or directory
3 | #include <math>
| ^~~~~~
compilation terminated.
|
s651891869 | p01802 | C++ | #include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<sstream>
#include<stack>
#include<map>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define P pair<int,int>
#define ... | a.cc: In function 'int main()':
a.cc:27:18: error: 'sqrt' was not declared in this scope
27 | double k=sqrt(x*x+y*y)-e;
| ^~~~
|
s565137053 | p01802 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main(){
int d,e,x,y;
while(cin >> d >> e && d){
float ans;
ans = 1e6;
for(x=0;x<=d;x++){
y = d-x;
ans = min(fabs(sqrt(x*x+y*y)-e),ans);
}
cout << ans << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:13: error: no matching function for call to 'min(double, float&)'
13 | ans = min(fabs(sqrt(x*x+y*y)-e),ans);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:... |
s753568586 | p01802 | 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
| |
s829357269 | p01803 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.util.HashSet;
public class AOJ_2700 {
int N;
char[] B = {'a','i','u','e','o'};
public void solve() {
while(true){
N = nextInt();
if(N == 0)break;
String[] S = new St... | Main.java:8: error: class AOJ_2700 is public, should be declared in a file named AOJ_2700.java
public class AOJ_2700 {
^
1 error
|
s984395397 | p01803 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class toi1 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while((str = br.readLine... | Main.java:7: error: class toi1 is public, should be declared in a file named toi1.java
public class toi1 {
^
1 error
|
s556009886 | p01803 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class toi1 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while((str = br.readLine... | Main.java:7: error: class toi1 is public, should be declared in a file named toi1.java
public class toi1 {
^
1 error
|
s493587748 | p01803 | C | #include<stdio.h>
#include<string.h>
#define rep(i,n) for(i=0;i<n;i++)
int max(int a,int b){
return a>b?a:b;
}
int main(void){
int n,m,i,j,k,l,f;
char s[50][51],t[50][51];
while(scanf(“%d”,&n,),n){
l=0;
rep(i,n){
scanf(“%s”,s[i]);
l=max(l,strlen(s[i]));
}... | main.c: In function 'main':
main.c:11:17: error: stray '\342' in program
11 | while(scanf(<U+201C>%d<U+201D>,&n,),n){
| ^~~~~~~~
main.c:11:18: error: expected expression before '%' token
11 | while(scanf(“%d”,&n,),n){
| ^
main.c:11:20: error: stray '\342' in pr... |
s919337281 | p01803 | C | #include<stdio.h>
#include<string.h>
#define rep(i,n) for(i=0;i<n;i++)
int max(int a,int b){
return a>b?a:b;
}
int main(void){
int n,m,i,j,k,l,f;
char s[50][51],t[50][51];
while(scanf(”%d”,&n,),n){
l=0;
rep(i,n){
scanf(”%s”,s[i]);
l=max(l,strlen(s[i]));
}... | main.c: In function 'main':
main.c:11:17: error: stray '\342' in program
11 | while(scanf(<U+201D>%d<U+201D>,&n,),n){
| ^~~~~~~~
main.c:11:18: error: expected expression before '%' token
11 | while(scanf(”%d”,&n,),n){
| ^
main.c:11:20: error: stray '\342' in pr... |
s614430540 | p01803 | C | #include<stdio.h>
#include<string.h>
#define rep(i,n) for(i=0;i<n;i++)
int max(int a,int b){
return a>b?a:b;
}
int main(void){
int n,m,i,j,k,l,f;
char s[50][51],t[50][51];
while(scanf("%d"&n,),n){
l=0;
rep(i,n){
scanf("%s",s[i]);
l=max(l,strlen(s[i]));
}
... | main.c: In function 'main':
main.c:11:21: error: invalid operands to binary & (have 'char *' and 'int')
11 | while(scanf("%d"&n,),n){
| ~~~~^
| |
| char *
main.c:11:24: error: expected expression before ')' token
11 | while(scanf("%d"&n,),n... |
s623783978 | p01803 | C | #include<stdio.h>
#include<string.h>
#define rep(i,n) for(i=0;i<n;i++)
int max(int a,int b){
return a>b?a:b;
}
int main(void){
int n,m,i,j,k,l,f;
char s[50][51],t[50][51];
while(scanf("%d",&n),n){
l=0;
rep(i,n){
scanf("%s",s[i]);
l=max(l,strlen(s[i]));
}
... | main.c: In function 'main':
main.c:24:54: error: expected statement before ')' token
24 | if(strchr("aiueo",s[i][m])!=NULL)){
| ^
|
s058550188 | p01803 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
string part(string str, unsigned int num)
{
string ret = str.substr(0, 1);
int count = 0;
for (unsigned int i = 0; i < str.size() - 1; i++) {
if (str[i] == 'a' || str[i] == 'i' || str[i] == 'u' || str[i] == 'e' || s... | a.cc: In function 'int main()':
a.cc:67:38: error: no matching function for call to 'max(unsigned int&, std::__cxx11::basic_string<char>::size_type)'
67 | maxsize = max(maxsize, strings[i].size());
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from... |
s422776127 | p01803 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
string part(string str, unsigned int num)
{
string ret = str.substr(0, 1);
int count = 0;
for (unsigned int i = 0; i < str.size() - 1; i++) {
if (str[i] == 'a' || str[i] == 'i' || str[i] == 'u' || str[i] == 'e' || s... | a.cc: In function 'int main()':
a.cc:67:38: error: no matching function for call to 'max(unsigned int&, std::__cxx11::basic_string<char>::size_type)'
67 | maxsize = max(maxsize, strings[i].size());
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from... |
s190106292 | p01803 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
string part(string str, unsigned int num)
{
string ret = str.substr(0, 1);
int count = 0;
for (unsigned int i = 0; i < str.size() - 1; i++) {
if (str[i] == 'a' || str[i] == 'i' || str[i] == 'u' || str[i] == 'e' || s... | a.cc: In function 'int main()':
a.cc:67:35: error: no matching function for call to 'max(unsigned int&, std::__cxx11::basic_string<char>::size_type)'
67 | maxx = max(maxx, strings[i].size());
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/includ... |
s111448853 | p01803 | C++ | #include <iostream>
#include <string>
using namespace std;
#define INF 55
string name[10000], dp[10000]; //name????????????????????????????????????dp[i]???name[i]????????¨?????????
int snum[10000]; //name[i]???????????????snum[i]????????¨?????????????????§?¢????????????????????????????
// ???????????????????????????... | a.cc: In function 'int main()':
a.cc:79:5: error: 'memset' was not declared in this scope
79 | memset(name, 0, sizeof(name));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstring... |
s732748343 | p01803 | C++ | #include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
string s[51], t[51];
bool check(int n, int k) {
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
//cout << i << " " << j << " ";
//cout << t[i].substr(0, k) << " " << t[j].substr(0, k) <... | a.cc:58:1: error: 'sakamo' does not name a type
58 | sakamo
| ^~~~~~
|
s588099124 | p01803 | C++ | #include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
string s[51], t[51];
bool check(int n, int k) {
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
//cout << i << " " << j << " ";
//cout << t[i].substr(0, k) << " " << t[j].substr(0, k) <... | a.cc:58:1: error: 'sakamo' does not name a type
58 | sakamo
| ^~~~~~
|
s992541546 | p01803 | C++ | #include <bits/stdc++.h>
#define r(i,n) for(i=0;i<n;i++)
using namespace std;
int main(){
int n,i,j,q;
while(cin>>n,n){
int m=0,tt;
string p[n],s[n];
r(i,n){cin>>p[i];}
r(i,n){tt=p[i].size();r(j,tt){
if(!j)s[i]+=p[i][j];
else{if(p[i][j-1]=='a'||p[i][j-1]=='i'||p[i][j-1]=='u'||p[i][j-1]==... | a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s900813480 | p01803 | 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
| |
s342794643 | p01803 | 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
| |
s581570941 | p01803 | 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
| |
s379515137 | p01804 | C | #include <bits/stdc++.h>
#define reps(i,s,n) for(int i=(s); i<(n); i++)
#define rep(i,n) reps(i,0,n)
#define rrep(i,n) for(int i=n-1; i>=0: i--)
#define X first
#define Y second
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const ll INF = 1e9;
bool B[3][2][2][2];
int H... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s031474484 | p01804 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <cstdio... | a.cc: In function 'int dfs(std::vector<std::vector<std::vector<int> > >&, int)':
a.cc:97:9: error: jump to label 'x'
97 | x:;
| ^
a.cc:91:93: note: from here
91 | if (l + i > 2 || j + m > 2 || l + i == 0 || j + m == 0)goto x;
| ... |
s044874121 | p01805 | C++ | #include <iostream>
#include <queue>
#include <utility>
#include <tuple>
using namespace std;
int H, W, R, C;
enum { LEFT, UP, RIGHT, DOWN };
int di[] = { 0, -1, 0, +1 };
int dj[] = { -1, 0, +1, 0 };
int door[510][510][4];
int ok[510][510];
int vis[510][510];
bool check(int i, int j) {
int flg[2] = {};
for ... | a.cc: In function 'int main()':
a.cc:32:9: error: 'memset' was not declared in this scope
32 | memset(ok, 0, sizeof ok);
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <utility>
+++ |+#include <cstri... |
s765673502 | p01805 | C++ |
#include <bits/stdc++.h>
using namespace std;
int H,W,Y,X;
vector<vector<int>> wy;
vector<vector<int>> wx;
typedef tuple<int,int,int> T;
map<T,int> mp;
bool search(int y,int x,int w){
if(y<0 || y>=H) return true;
if(x<0 || x>=W) return true;
if(mp.find(T(y,x,w))!=mp.end())
return mp[T(y,x,w)];
... | a.cc:99:1: error: expected unqualified-id before '?' token
99 | ???
| ^
In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_ForwardIterator s... |
s742566720 | p01805 | C++ |
#include <bits/stdc++.h>
using namespace std;
int H,W,Y,X;
vector<vector<int>> wy;
vector<vector<int>> wx;
typedef tuple<int,int,int> T;
map<T,int> mp;
bool search(int y,int x,int w){
if(y<0 || y>=H) return true;
if(x<0 || x>=W) return true;
if(mp.find(T(y,x,w))!=mp.end())
return mp[T(y,x,w)];
... | a.cc:99:1: error: expected unqualified-id before '?' token
99 | ???
| ^
In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_ForwardIterator s... |
s538458055 | p01805 | C++ | #include<bits/stdc++.h>
using namespace std;
#pragma warning(disable:4996)
//FILE *in = freopen("input.txt", "r", stdin);
int H, W, X, Y, tate[600][600], yoko[600][600], dp[600][600][2][2], dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 };
struct State { int s1, s2, s3, s4; };
bool operator<(State u1, State u2) {
if (u1.s1 ... | a.cc: In function 'int main()':
a.cc:47:49: error: 'eord' was not declared in this scope
47 | __asm__ volatile("mov %%rsp, %0" : "=r"(eord));
| ^~~~
a.cc:48:50: error: 'enew' was not declared in this scope
48 | __asm__ volatile("mov %0, %%rsp" ... |
s902958259 | p01805 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
int h,w,r,c;
vector<vector<int>> horz;
vector<vector<int>> vert;
vector<vector<vector<vector<int>>>> dp;
int dh[]={1,-1,0,0};
int dw[]={0,0,1,-1};
bool isrange(int i,int j){
return 0<=i && i<h &&... | a.cc: In function 'int main()':
a.cc:74:16: error: no matching function for call to 'std::vector<std::vector<int> >::resize(int, int)'
74 | horz.resize(h*3,0);
| ~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
... |
s935532891 | p01805 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
int h, w, r, c;
vector<vector<int>> horz;
vector<vector<int>> vert;
vector<vector<vector<vector<int>>>> dp;
int dh[] = { 1,-1,0,0 };
int dw[] = { 0,0,1,-1 };
bool isrange(int i, int j) {
return 0 ... | /usr/bin/ld: /tmp/ccVnUWPD.o: relocation R_X86_64_32S against undefined symbol `esp_org' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
|
s658914563 | p01805 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
using board3D = vector< vector< vector<int> > >;
using board2D = vector< vector<int> >;
int H, W, R, C;
vector< vector< vector<int> > > orig, modi;
int memo[510][510][2], visited[510][510];
// up, left, down, right
int dx[] = {-1, 0, 1, 0};
... | a.cc: In function 'int main()':
a.cc:78:5: error: 'memset' was not declared in this scope
78 | memset(memo, -1, sizeof(memo));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <vector>
+++ |+#include <cstring>... |
s915445449 | p01806 | C | ???????????????????????? | main.c:1:1: error: expected identifier or '(' before '?' token
1 | ????????????????????????
| ^
|
s267638670 | p01806 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <cstdio... | a.cc:24:7: error: conflicting declaration 'using pii = struct std::pair<short unsigned int, short unsigned int>'
24 | using pii = pair<unsigned short, unsigned short>;
| ^~~
a.cc:22:24: note: previous declaration as 'typedef struct std::pair<int, int> pii'
22 | typedef pair<int, int> pii;
| ... |
s957173649 | p01806 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <cstdio... | a.cc:58:1: error: template class without a name
58 | enum {
| ^~~~
a.cc: In function 'int main()':
a.cc:76:53: error: 'u' was not declared in this scope
76 | buf = { buf[u],buf[d],buf[f],buf[b],buf[l],buf[r] };
| ... |
s316333133 | p01806 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
struct Dice {
int tp;
int bo;
int no;
int so;
int ea;
int we;
Dice(const int tp_, const int bo... | a.cc: In function 'std::pair<int, std::map<std::pair<short int, short int>, int> > getmemo(const std::vector<std::map<std::pair<short int, short int>, short int> >&, std::vector<std::pair<int, std::map<std::pair<short int, short int>, short int> > >&, std::bitset<15>&)':
a.cc:122:41: error: could not convert 'std::make... |
s385252037 | p01806 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,... | In file included from /usr/include/c++/14/bits/stl_tempbuf.h:61,
from /usr/include/c++/14/bits/stl_algo.h:69,
from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_c... |
s330278376 | p01806 | C++ | #include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;
class Dice{
public:
void roll(char dst){
for(int i = 0; i < 6; i++) work[i] = number[i];
switch(dst){
case 'R':
setNumber(work... | a.cc:88:13: error: 'int index [15]' redeclared as different kind of entity
88 | int index[15]; //サイコロが転がるマスの数
| ^
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
... |
s489075783 | p01809 | C | #include <iostream>
#include <numeric>
using namespace std;
#define FOR(i,a,b) for (size_t i = a; i < b; i++)
#define REP(i,b) FOR(i,0,b)
#define RFOR(i,a,b) for (size_t i = a-1; i >= b; i--)
#define RREP(i,a) RFOR(i,a,0)
#define INF 1e7
int main()
{
int p, q, r;
cin>>p>>q;
RFOR(i,p+1,1) {
if (!(p%i | q%i))... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s993996278 | p01809 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int gcd(int a,int b){
if(a<b){swap(a,b);}
if(!b){return a;}
return gcd(b,a%b);
}
int main(){
int a=1,p,q,i,gc;
vector<int> cds;
cin>>p>>q;
gc=gcd(p,q);
p/=gc;q/=gc;
for(i=2;i<sqrt(q)+1;i++){
if(!(q%i)){
a... | a.cc: In function 'int main()':
a.cc:13:5: error: 'vector' was not declared in this scope
13 | vector<int> cds;
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <cmath>
+++ |+#include <vector>
3 | using... |
s672534029 | p01809 | C++ | #include <bits/stdc++.h>
using namespace std;
int p, q, r = 1;
int main() {
scanf("%d%d", &p, &q);
q = q / _gcd(p, q);
for(int i = 2; i * i <= q; i++) {
if(q % i == 0) {
r *= i;
while(q % i == 0) q /= i;
}
}
printf("%d\n", r * q);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:17: error: '_gcd' was not declared in this scope
6 | q = q / _gcd(p, q);
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.