submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s846066186 | p00803 | Java | public class AOJ1224{
void run(String num){
int max=0;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
for(Integer i=0;i<54;i++){
for(Integer j=0;j<96;j++){
if((f1[i]+f2[j])<=num) max=Math.max(max,f1[i]+f... | Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
^
Main.java:10: error: bad operand types for binary operator '<='
if((f1[i]+f2[j])<=num) max=Math.max(max,f1[i]+f2[j]);
^
first type: int
second type: String
2 errors
|
s717772088 | p00803 | Java | public class AOJ1224{
void run(String num){
int max=0,tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
for(Integer i=0;i<54;i++){
for(Integer j=0;j<96;j++){
tiaojian=f1[i]+f2[j];
if(tiaojian<... | Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
^
Main.java:11: error: bad operand types for binary operator '<='
if(tiaojian<=num) max=Math.max(max,tiaojian);
^
first type: int
second type: String
2 errors
|
s753017002 | p00803 | Java | class AOJ1224{
void run(String num){
int max=0,tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
for(Integer i=0;i<54;i++){
for(Integer j=0;j<96;j++){
tiaojian=f1[i]+f2[j];
if(tiaojian<=num) m... | Main.java:11: error: bad operand types for binary operator '<='
if(tiaojian<=num) max=Math.max(max,tiaojian);
^
first type: int
second type: String
1 error
|
s392062753 | p00803 | Java | class AOJ1224{
void run(String num){
int max=0,tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
for(Integer i=0;i<54;i++){
for(Integer j=0;j<96;j++){
tiaojian=f1[i]+f2[j];
if(tiaojian<num) ma... | Main.java:11: error: bad operand types for binary operator '<'
if(tiaojian<num) max=Math.max(max,tiaojian);
^
first type: int
second type: String
1 error
|
s008803922 | p00803 | Java | import java.util.Scanner;
class AOJ1224{
void run(){
int tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
Scanner n = new Scanner(System.in);
for(;;){
int num = sc.nextInt();
if (num.euals(0)) bre... | Main.java:11: error: cannot find symbol
int num = sc.nextInt();
^
symbol: variable sc
location: class AOJ1224
Main.java:12: error: int cannot be dereferenced
if (num.euals(0)) break;
^
2 errors
|
s028423998 | p00803 | Java | import java.util.Scanner;
class AOJ1224{
void run(){
int tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
Scanner n = new Scanner(System.in);
for(;;){
int num = n.nextInt();
if (num.euqls(0)) brea... | Main.java:12: error: int cannot be dereferenced
if (num.euqls(0)) break;
^
1 error
|
s410886567 | p00803 | Java | import java.util.Scanner;
class AOJ1224{
void run(){
int tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
Scanner n = new Scanner(System.in);
for(;;){
int num = n.nextInt();
if (num.equals(0)) bre... | Main.java:12: error: int cannot be dereferenced
if (num.equals(0)) break;
^
1 error
|
s196158592 | p00803 | Java | import java.util.Scanner;
class AOJ1224{
void run(){
int tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
Scanner n = new Scanner(System.in);
for(;;){
int num = n.nextInt();
if (num.equals(0)) bre... | Main.java:12: error: int cannot be dereferenced
if (num.equals(0)) break;
^
1 error
|
s165937744 | p00803 | Java | import java.util.Scanner;
public class AOJ1224{
void run(){
int tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<96;i++) f2[i] = i*(i+1)*(i+2)/6;
Scanner n = new Scanner(System.in);
for(;;){
Integer num = n.nextInt();
// System.o... | Main.java:2: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
^
1 error
|
s010072778 | p00803 | Java | class AOJ1224{
void run(){
int tiaojian;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<96;i++) f2[i] = i*(i+1)*(i+2)/6;
Scanner n = new Scanner(System.in);
for(;;){
Integer num = n.nextInt();
// System.out.println(num);
if (num.equals... | Main.java:8: error: cannot find symbol
Scanner n = new Scanner(System.in);
^
symbol: class Scanner
location: class AOJ1224
Main.java:8: error: cannot find symbol
Scanner n = new Scanner(System.in);
^
symbol: class Scanner
location: class AOJ1224
2 errors
|
s904195940 | p00803 | C | i,z=151201,table[z];main(j,n){for(;i<54;i++)for(j=0;j<54;j++)if((n=i*i*i+j*(j+1)*(j+2)/6)<z)table[n]=1;for(;scanf("%d",&n),n;printf("%d\n",n))while(!table[n])n--;} | main.c:1:1: warning: data definition has no type or storage class
1 | i,z=151201,table[z];main(j,n){for(;i<54;i++)for(j=0;j<54;j++)if((n=i*i*i+j*(j+1)*(j+2)/6)<z)table[n]=1;for(;scanf("%d",&n),n;printf("%d\n",n))while(!table[n])n--;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimpli... |
s460446976 | p00803 | C | i,z=151201;main(j,n){table[z];for(;i<54;i++)for(j=0;j<54;j++)if((n=i*i*i+j*(j+1)*(j+2)/6)<z)table[n]=1;for(;scanf("%d",&n),n;printf("%d\n",n))while(!table[n])n--;} | main.c:1:1: warning: data definition has no type or storage class
1 | i,z=151201;main(j,n){table[z];for(;i<54;i++)for(j=0;j<54;j++)if((n=i*i*i+j*(j+1)*(j+2)/6)<z)table[n]=1;for(;scanf("%d",&n),n;printf("%d\n",n))while(!table[n])n--;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimpli... |
s488018772 | p00803 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
__int128 a[160000],n;
int main(){
r(j,1e9){
int t=j*j*j;
if(t>=160000)break;
a[t]++;
r(i,1e9){
int p=i*(i+1)*(i+2)/6;
if(p<160000)a[p]++;
else break;
if(p+t<160000)a[p+t]++;
}
}
r(i,160000)... | a.cc: In function 'int main()':
a.cc:21:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128')
21 | while(cin>>n,n) cout<<a[n]<<endl;
| ~~~^~~
| | |
| | __int128
| std::istream {aka std::b... |
s167241010 | p00803 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
__128int a[160000],n;
int main(){
r(j,1e9){
int t=j*j*j;
if(t>=160000)break;
a[t]++;
r(i,1e9){
int p=i*(i+1)*(i+2)/6;
if(p<160000)a[p]++;
else break;
if(p+t<160000)a[p+t]++;
}
}
r(i,160000)... | a.cc:4:1: error: '__128int' does not name a type
4 | __128int a[160000],n;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'a' was not declared in this scope
9 | a[t]++;
| ^
a.cc:18:8: error: 'a' was not declared in this scope
18 | if(a[i])a[i]=i;
| ^
a.cc:21:... |
s467398627 | p00803 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
__int128 a[160000],n;
int main(){
r(j,1e9){
int t=j*j*j;
if(t>=160000)break;
a[t]++;
r(i,1e9){
int p=i*(i+1)*(i+2)/6;
if(p<160000)a[p]++;
else break;
if(p+t<160000)a[p+t]++;
}
}
r(i,160000)... | a.cc: In function 'int main()':
a.cc:21:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128')
21 | while(cin>>n,n) cout<<a[n]<<endl;
| ~~~^~~
| | |
| | __int128
| std::istream {aka std::b... |
s222983808 | p00803 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
__128int a[160000],n;
int main(){
r(j,1e9){
int t=j*j*j;
if(t>=160000)break;
a[t]++;
r(i,1e9){
int p=i*(i+1)*(i+2)/6;
if(p<160000)a[p]++;
else break;
if(p+t<160000)a[p+t]++;
}
}
r(i,160000)... | a.cc:4:1: error: '__128int' does not name a type
4 | __128int a[160000],n;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'a' was not declared in this scope
9 | a[t]++;
| ^
a.cc:18:8: error: 'a' was not declared in this scope
18 | if(a[i])a[i]=i;
| ^
a.cc:21:... |
s645191431 | p00804 | C++ | #include<stdio.h>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
char in[110];
int h[1100];
int g[1100];
int type[1100];
int v[1100];
int s[1100];
int sum[1100];#include<stdio.h>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
char in[110];
int h[1100];
int g[1100];
int ... | a.cc:12:15: error: stray '#' in program
12 | int sum[1100];#include<stdio.h>
| ^
a.cc:12:16: error: 'include' does not name a type
12 | int sum[1100];#include<stdio.h>
| ^~~~~~~
a.cc:17:6: error: redefinition of 'char in [110]'
17 | char in[110];
| ^~
a.cc:6:... |
s468772118 | p00804 | C++ | #include<map>
#include<cstdio>
#include<string>
#include<vector>
#include<numeric>
#include<iostream>
#define pb push_back
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef vector<int> vi;
struct Data{
int id_dlr,val,t;
Data(){}
Data(int ID,int V,int T):id_dlr(ID),val(V),t(T){}
bool isSameDea... | a.cc: In function 'int main()':
a.cc:91:33: error: 'sort' was not declared in this scope; did you mean 'short'?
91 | sort(lst_sell[id_itm].begin(),lst_sell[id_itm].end(),lt);
| ^~~~
| short
a.cc:95:33: error: ... |
s450377134 | p00804 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<algorithm>
#include<numeric>
#include<cstdlib>
using namespace std;
typedef string S;
typedef pair<int,S>P;
typedef list<P>L;
typedef map<char,L>B;
typedef map<char,vector<int> >C;
typedef map<S,pair<int,int> >D;
int SS(const P&l... | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:6:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = _List_iterator<pair<int, __cxx11::basic_string<char> > >; _Compare... |
s740097873 | p00804 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<algorithm>
#include<functional>
#include<numeric>
#include<cstdlib>
using namespace std;
typedef string S;
typedef pair<int,S>P;
typedef list<P>L;
typedef map<char,L>B;
typedef map<char,vector<int> >C;
typedef map<S,pair<int,int>... | a.cc:17:11: warning: 'template<class _Arg1, class _Arg2, class _Result> struct std::binary_function' is deprecated [-Wdeprecated-declarations]
17 | struct SS:binary_function<const P&,const P&,int>{int operator()(const P&l,const P&r){return l.first<r.first;}};
| ^~~~~~~~~~~~~~~
In file included from /... |
s503765368 | p00806 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<set>
using namespace std;
map<string, vector<string>> word;
set<int> size;
string stoi(const string& str) {
string result = "";
for(const auto& c: str) {
if('a' <= c && c <= 'o') result += (c - 'a') / 3 + '2';
if('p' <= c && c <= 's') ... | a.cc: In function 'void dfs(std::string, std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:27:24: error: reference to 'size' is ambiguous
27 | for(const auto& s: size) {
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/l... |
s720833990 | p00806 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
using namespace std;
map<string,string> digToWord;
map<char,int> mci;
map<string,vector<string> > dp;
vector<string> dfs(string str){
vector<string> res;
if(str=="")return res;
if(dp.find(str)!=dp.end())
return dp[s... | a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > dfs(std::string)':
a.cc:28:7: error: expected '}' before 'else'
28 | else if(vv.size()==0)
| ^~~~
a.cc:21:80: note: to match this '{'
21 | if(str.size()>=it->first.size()&&str.substr(0,it->first.size())==it->first){
| ... |
s463740578 | p00806 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
using namespace std;
map<string,string> digToWord;
map<char,int> mci;
map<string,vector<string> > dp;
vector<string> dfs(string str){
vector<string> res;
if(str=="")return res;
if(dp.find(str)!=dp.end())
return dp[s... | a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > dfs(std::string)':
a.cc:28:7: error: expected '}' before 'else'
28 | else if(vv.size()==0)
| ^~~~
a.cc:21:80: note: to match this '{'
21 | if(str.size()>=it->first.size()&&str.substr(0,it->first.size())==it->first){
| ... |
s238186891 | p00806 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
using namespace std;
map<string,string> digToWord;
map<char,int> mci;
map<string,vector<string> > dp;
vector<string> dfs(string str){
vector<string> res;
if(str=="")return res;
if(dp.find(str)!=dp.end())
return dp[s... | a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > dfs(std::string)':
a.cc:28:7: error: expected '}' before 'else'
28 | else if(vv.size()==0){
| ^~~~
a.cc:21:80: note: to match this '{'
21 | if(str.size()>=it->first.size()&&str.substr(0,it->first.size())==it->first){
| ... |
s358797246 | p00806 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
using namespace std;
map<string,vector<string> > digToWord;
map<char,int> mci;
map<string,vector<string> > dp;
vector<string> dfs(string str){
vector<string> res;
if(str=="")return res;
if(dp.find(str)!=dp.end())
re... | a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > dfs(std::string)':
a.cc:29:7: error: expected '}' before 'else'
29 | else if(vv.size()==0){
| ^~~~
a.cc:22:80: note: to match this '{'
22 | if(str.size()>=it->first.size()&&str.substr(0,it->first.size())==it->first){
| ... |
s832485010 | p00807 | C++ | #include<bits/stdc++.h>
#define f first
#define s second
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
string s,t;
int n;
int dy1[6]={1,1,0,-1,-1,0};
int dx1[6]={0,-1,-1,0,1,1};
int dy2[6]={-1,-1,0,1,1,0};
int dx2[6]={0,1,1,0,-1,-1};
bool b[1000][1000];
bool c[1000][1000];
main(){
c... | a.cc:15:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
15 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:20:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
20 | if(s=='-'){
| ^~... |
s200691819 | p00808 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <map>
#include <queue>
using namespace std;
int strToTime(string &s){
return atoi(s.substr(0,2).c_str())*60 + atoi(s.substr(3,2).c_str());
}
struct edge{
int cost;
int start;
int goal;
int to;... | a.cc: In function 'int main()':
a.cc:90:25: error: 'else' without a previous 'if'
90 | else{
| ^~~~
a.cc:91:41: error: 'ns' was not declared in this scope; did you mean 's'?
91 | minCosts[i][ns.node][ns.cTime]=ns.cost;
| ... |
s542528478 | p00808 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <map>
#include <queue>
using namespace std;
int strToTime(string &s){
return atoi(s.substr(0,2).c_str())*60 + atoi(s.substr(3,2).c_str());
}
struct edge{
int cost;
int start;
int goal;
int to;... | a.cc: In function 'int main()':
a.cc:90:25: error: 'else' without a previous 'if'
90 | else{
| ^~~~
a.cc:91:41: error: 'ns' was not declared in this scope; did you mean 's'?
91 | minCosts[i][ns.node][ns.cTime]=ns.cost;
| ... |
s409865740 | p00808 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <map>
#include <queue>
using namespace std;
int strToTime(string &s){
return atoi(s.substr(0,2).c_str())*60 + atoi(s.substr(3,2).c_str());
}
struct edge{
int cost;
int start;
int goal;
int to;... | a.cc: In function 'int backMinCost(int, int, int)':
a.cc:150:17: error: 'else' without a previous 'if'
150 | else{
| ^~~~
a.cc:151:23: error: 'ns' was not declared in this scope; did you mean 's'?
151 | d[ns.node][ns.cTime]=ns.cost;
| ... |
s923606849 | p00808 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <map>
#include <queue>
using namespace std;
int strToTime(string &s){
return atoi(s.substr(0,2).c_str())*60 + atoi(s.substr(3,2).c_str());
}
struct edge{
int cost;
int start;
int goal;
int to;... | a.cc: In function 'int main()':
a.cc:90:25: error: 'else' without a previous 'if'
90 | else{
| ^~~~
a.cc:91:41: error: 'ns' was not declared in this scope; did you mean 's'?
91 | minCosts[i][ns.node][ns.cTime]=ns.cost;
| ... |
s732693865 | p00809 | C++ | #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
using namespace std;
#define for(i,k,n) for(int i=(k); i<(int)n; +... | a.cc:22:77: error: macro "for" requires 3 arguments, but only 1 given
22 | template<class t> void debug(t begin, t end){ for(t i = begin; i != end; ++i) cout<<*i<<" "; cout<<endl; }
| ^
a.cc:18:9: note: macro "for" defined here
18 |... |
s867591777 | p00810 | C | N;double X[30],Y[30],Z[30],cx,cy,cz;
#define Q(x)(x)*(x)
double distance2(int i) { return sqrt(Q(X[i]-cx)+Q(Y[i]-cy)+Q(Z[i]-cz)); }
int longest() {
double max = 0; int max_i;
for (int i=0; i<N; ++i)
if (distance2(i) > max){
max=distance2(i);
max_i=i;
}
return max_i;
}
int main() {
while (scanf("%d",&N) ... | main.c:1:1: warning: data definition has no type or storage class
1 | N;double X[30],Y[30],Z[30],cx,cy,cz;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c: In function 'distance2':
main.c:3:34: error: implicit declaration of function 'sqrt' [-Wimplicit-function-decl... |
s619548028 | p00810 | C | N,i,M;double X[30],Y[30],Z[30],cx,cy,cz,d,m;
#define Q(x)(x)*(x)
double D(i){return sqrt(Q(X[i]-cx)+Q(Y[i]-cy)+Q(Z[i]-cz));}
int L(){for(m=i=0;i<N;i++)if(D(i)>m)m=D(i),M=i;return M;}
main(t){for(;scanf("%d",&N),N;printf("%.f\n",D(L()));){
for( i=0; i<N; ++i) scanf("%lf%lf%lf", X+i, Y+i, Z+i);
cx = cy = cz = 0.5;
... | main.c:1:1: warning: data definition has no type or storage class
1 | N,i,M;double X[30],Y[30],Z[30],cx,cy,cz,d,m;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
1 | N,i,M;double X[30],Y[... |
s793132764 | p00810 | C++ | #include <iostream>
#include <cmath>
#define pow2(x) ((x)*(x))
using namespace std;
struct three_d{
double x, y, z;
} stars[31];
int n;
double distancex(three_d from, int to){
return pow2(from.x-stars[to].x) + pow2(from.y-stars[to].y) + pow2(from.z-stars[to].z);
}
int main(){
while((cin >> n), n){
for(int ... | a.cc: In function 'int main()':
a.cc:28:22: error: no matching function for call to 'distance(three_d&, int&)'
28 | if(distance(now, i) > maxdis){
| ~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s712554207 | p00810 | C++ | #include <cstdio>
#include <cmath>
#define Q(x)(x)*(x)
N,i,M;double X[30],Y[30],Z[30],cx,cy,cz,d,m;
double D(i){return sqrt(Q(X[i]-cx)+Q(Y[i]-cy)+Q(Z[i]-cz));}
int L(){for(m=i=0;i<N;i++)if(D(i)>m)m=D(i),M=i;return M;}
main(t){for(;scanf("%d",&N),N;printf("%f\n",D(L()))){
for(i=0;i<N;i++)scanf("%lf%lf%lf",X+i,Y+i,Z+i);... | a.cc:4:1: error: 'N' does not name a type
4 | N,i,M;double X[30],Y[30],Z[30],cx,cy,cz,d,m;
| ^
a.cc:5:10: error: 'i' was not declared in this scope
5 | double D(i){return sqrt(Q(X[i]-cx)+Q(Y[i]-cy)+Q(Z[i]-cz));}
| ^
a.cc: In function 'int L()':
a.cc:6:15: error: 'i' was not declared in this... |
s915970382 | p00810 | C++ | #include <cstdio>
#include <cmath>
#define Q(x)(x)*(x)
int N,i,M;double X[30],Y[30],Z[30],cx,cy,cz,d,m;
double D(i){return sqrt(Q(X[i]-cx)+Q(Y[i]-cy)+Q(Z[i]-cz));}
int L(){for(m=i=0;i<N;i++)if(D(i)>m)m=D(i),M=i;return M;}
main(t){for(;scanf("%d",&N),N;printf("%f\n",D(L()))){
for(i=0;i<N;i++)scanf("%lf%lf%lf",X+i,Y+i,Z... | a.cc:5:12: error: expected ',' or ';' before '{' token
5 | double D(i){return sqrt(Q(X[i]-cx)+Q(Y[i]-cy)+Q(Z[i]-cz));}
| ^
a.cc: In function 'int L()':
a.cc:6:31: error: 'D' cannot be used as a function
6 | int L(){for(m=i=0;i<N;i++)if(D(i)>m)m=D(i),M=i;return M;}
| ... |
s191289051 | p00811 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:30: error: cannot find symbol
Fracion f=new Fraction(ir.nextLong(),ir.nextLong());
^
symbol: class Fracion
location: class Main
Main.java:31: error: cannot find symbol
if(m==0&&a==0&&b==0) return;
^
symbol: variable a
location: class Main
Main.java:31: error: cannot find symbol
... |
s409794735 | p00811 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:31: error: incomparable types: boolean and int
while(d[m]==null||d[m].subtract(f).signum()!=1) m--;
^
Main.java:91: error: non-static variable nu cannot be referenced from a static context
if(nu==0) return 0;
^
Main.java:91: error: incompatible types: int ... |
s818841058 | p00811 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:91: error: non-static variable nu cannot be referenced from a static context
if(nu==0) return 0;
^
Main.java:92: error: non-static variable de cannot be referenced from a static context
if(de*nu>0) return 1;
^
Main.java:92: error: non-static variable nu cannot be referenced from a static context... |
s181028489 | p00811 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:91: error: non-static variable this cannot be referenced from a static context
if(this.nu==0) return 0;
^
Main.java:92: error: non-static variable this cannot be referenced from a static context
if(this.de*this.nu>0) return 1;
^
Main.java:92: error: non-static variable this cannot be referenced ... |
s422724252 | p00811 | C++ | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int SIZ = 100000;
int sieve[SIZ];
vector<int> getPrimes() {
vector<int> primes;
fill_n(sieve, SIZ, true);
sieve[0] = sieve[1] = false;
for (int i=2; i<SIZ; ++i) {
if ( ! sieve[i]) continue;
primes.pu... | a.cc: In function 'int main()':
a.cc:34:32: error: request for member 'size' in 'p', which is of non-class type 'int'
34 | for (int i=0; i<(int)p.size(); ++i) {
| ^~~~
a.cc:35:36: error: request for member 'size' in 'p', which is of non-class type 'int'
35 | ... |
s376730528 | p00811 | C++ | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <numeric>
#include <string>
#include <string.h>
#include <map>
#include <set>
#include <functional>
#include <complex>
#include <stack>
#include <tuple>
#define ll long long int
using namespace std;
const ll INF =... | a.cc:16:22: error: '::main' must return 'int'
16 | #define ll long long int
| ^~~
a.cc:41:1: note: in expansion of macro 'll'
41 | ll main(){
| ^~
|
s832426506 | p00811 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#pragma warning(disable:4996)
using namespace std;
const int My_Inf=2147483647;
const long long int My_LInf=9223372036854775807;
int a[10000];
bool isprime(long long int a) {
if (a == 1 || a == 0)return false;
for (long long int i = 2; i*i <= a; ++i) {
if ((a%i)) {
... | a.cc: In function 'int main()':
a.cc:33:30: error: invalid types 'int[int]' for array subscript
33 | if (a[i])continue;
| ^
a.cc:36:49: error: invalid types 'int[int]' for array subscript
36 | if (i*j <= m&& a[j]) {
|... |
s305080253 | p00811 | C++ | #include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()
#define DEBUG(a) "(" << #a << ": " << (a) << ")"
templat... | a.cc:26:1: error: 'B' does not name a type
26 | B
| ^
a.cc:28:12: error: 'PRIMEMAX' was not declared in this scope; did you mean 'PRIbMAX'?
28 | int FACTOR[PRIMEMAX];
| ^~~~~~~~
| PRIbMAX
a.cc: In function 'void sieve()':
a.cc:31:3: error: 'FACTOR' was not declared in this ... |
s645501215 | p00811 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main()
{
vector<int> prime;
prime.push_back(2);
prime.push_back(3);
for (int i = 4; i < sqrt(100000) + 1; i++) {
bool flag = true;
for (int j = 0; j < prime.size(); j++) {
if (i%prime[j] == 0) {
flag =... | a.cc: In function 'int main()':
a.cc:12:29: error: 'sqrt' was not declared in this scope
12 | for (int i = 4; i < sqrt(100000) + 1; i++) {
| ^~~~
|
s171406358 | p00811 | C++ | #include<iostream>
using namespace std;
#define MAX_N 1000000
int prime[MAX_N];
bool is_prime[MAX_N+1];
int sieve(int n){
int p=0;
memset(is_prime,true,sizeof(is_prime));
is_prime[0]=is_prime[1]=false;
for(int i=2;i<=n;i++){
if(is_prime[i]){
prime[p++]=i;
for(int j=2*i;j<=n;j+=i)is_prime[j]=false;
}
}
... | a.cc: In function 'int sieve(int)':
a.cc:10:9: error: 'memset' was not declared in this scope
10 | memset(is_prime,true,sizeof(is_prime));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++... |
s702754017 | p00812 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
public class Main{
public void solve() throws Exception{
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String exp;
Parser parser = new Parser();
while(!(exp =... | Main.java:130: error: class Polynomial is public, should be declared in a file named Polynomial.java
public class Polynomial implements Comparable<Polynomial>{
^
1 error
|
s917499186 | p00812 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define INF (1LL<<59)
#define int ll
typedef array<int,27> AI;
typedef vector<AI> EX;
typedef string::const_iterator Stat... | a.cc: In function 'std::string normalize(std::string)':
a.cc:41:41: error: 'isnumber' was not declared in this scope
41 | if(u[i+1]=='('||isnumber(u[i+1])||isalpha(u[i+1]))ret+='*';
| ^~~~~~~~
|
s368440851 | p00812 | C++ | #include<bits/stdc++.h>
using namespace std;
const double EPS=1e-8;
vector<double> var;
void skip(string &s,int &p){
while(p<s.size() && s[p]==' ') p++;
}
double formula(string &s,int &p);
double num(string &s,int &p){
double res=0;
while(p<s.size() && isdigit(s[p])){
res*=10;
res+=s[p]-'0';
p++;
... | a.cc: In function 'double term1(std::string&, int&)':
a.cc:62:9: error: too few arguments to function 'void skip(std::string&, int&)'
62 | skip();
| ~~~~^~
a.cc:7:6: note: declared here
7 | void skip(string &s,int &p){
| ^~~~
|
s510605722 | p00812 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
string s;
int p;
ll A[200][300];
int idx;
ll bnf();
ll get_num(){
if(s[p]=='('){
p++;
ll res=bnf();
p++;
return res;
}
if('a'<=s[p]&&s[p]<='z') return A[T][s[p++]];
ll num=0;
while('0'<=s[p]&&... | a.cc: In function 'll get_num()':
a.cc:26:37: error: 'T' was not declared in this scope
26 | if('a'<=s[p]&&s[p]<='z') return A[T][s[p++]];
| ^
|
s807097515 | p00813 | C++ | #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef pair<int,int>P;
typedef pair<P,P>P2;
#define F first
#define S second
int a[4][4],kati[4],goal[4],goaled[4],gdiff[4],id;
string s[5];
void Perse(){
memset(a,0,sizeof(a));
a[0][1]=s[1][11]-'0';
a[0][2]=s[1][16]-'0';
a[0][3]=s[1... | a.cc: In function 'int main()':
a.cc:121:35: error: 'pro' was not declared in this scope
121 | double d1=pro[i];
| ^~~
a.cc:125:32: error: redeclaration of 'double d1'
125 | double d1=(kai[8]/(kai[i]*kai[8-i]))*pow(0.25,i)*pow(0... |
s578277834 | p00814 | C++ | ////////////////////////////////////////
/// tu3 pro-con template ///
////////////////////////////////////////
#include <Windows.h>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <functional>
#... | a.cc:4:10: fatal error: Windows.h: No such file or directory
4 | #include <Windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s721121612 | p00814 | C++ | ////////////////////////////////////////
/// tu3 pro-con template ///
////////////////////////////////////////
#include <Windows.h>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <functional>
#... | a.cc:4:10: fatal error: Windows.h: No such file or directory
4 | #include <Windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s524219051 | p00814 | C++ | 4 4
2
2 3
1 0 4
1 1 4 0
4 5
2
2 3
3 0 4
1 1 4 0
4 1
2
2 3
3 0 4
1 1 4 0
4 1
1
1 1
1 1 1
1 1 1 0
4 2
1
1 1
1 1 1
1 1 1 0
4 1
0
2 2
5 0 7
0 5 7 0
4 2
0
0 3
1 0 4
0 1 0 4
4 3
0
3 3
3 2 3
0 3 0 3
4 2
0
3 3
3 2 3
0 3 0 3
6 1
1
1 2
1 1 0
6 7 6 8
0 7 6 8 2
6... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4 4
| ^
|
s700025662 | p00815 | C++ | #include <iostream>
#include <vector>
#include <stack>
using namespace std;
struct state {
int index;
int free_child; //no. of free children
};
int trace_parent(int cur_index, int backtrack, int parentLookup[101]) {
if (backtrack == 0) return cur_index;
return trace_parent(parentLookup[cur_index], bac... | a.cc: In function 'int main()':
a.cc:69:7: error: 'sort' was not declared in this scope; did you mean 'short'?
69 | sort(output[i].begin(), output[i].end());
| ^~~~
| short
|
s622871832 | p00815 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)
void solve(int *dist,int *en,vector<int>*edge,vector<int>&inp,
int &p,int ff,int &cnt){//from first
int now = inp[p++];
int node = cnt;
dist[ff]=node;
en[node] = ... | a.cc: In function 'void solve(int*, int*, std::vector<int>*, std::vector<int>&, int&, int, int&)':
a.cc:21:7: error: 'assert' was not declared in this scope
21 | assert(en[node]>0 && en[to]>0);
| ^~~~~~
a.cc:4:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#... |
s909306050 | p00815 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)
void solve(vector<int> *dist,int *en,vector<int>*edge,vector<int>&inp,
int &p,int ff,int &cnt){//from first
int now = inp[p++];
int node = cnt;
dist[ff].push_back(n... | a.cc: In function 'void solve(std::vector<int>*, int*, std::vector<int>*, std::vector<int>&, int&, int, int&)':
a.cc:25:7: error: 'assert' was not declared in this scope
25 | assert(en[node]>0 && en[to]>0);
| ^~~~~~
a.cc:4:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable... |
s931223311 | p00816 | Java | import java.util.Arrays;
import java.util.Scanner;
public class ShreddingCompany {
int n, target;
int ans = -1;
boolean rejected = true;
int nums[];
int temp[] = new int[6];
public void shred(int x, int num, int index) {
for (int i = 10; i <= (num * 10); i *= 10) {
int mod = num % i;
temp[index] = mod;
... | Main.java:4: error: class ShreddingCompany is public, should be declared in a file named ShreddingCompany.java
public class ShreddingCompany {
^
1 error
|
s154811735 | p00816 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;
int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;}
string itos(int x){strin... | In file included from /usr/include/c++/14/queue:66,
from a.cc:10:
/usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<int, std::vector<int>, std::greater<int>()>':
a.cc:21:49: required from here
21 | priority_queue<int,vector<int>,greater<int>() >ta;
... |
s414096099 | p00816 | C++ | import java.util.*;
class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while(true) {
int t = sc.nextInt();
int n = sc.nextInt();
if(t == 0 && n == 0) break;
int len = String.valueOf(n).length();
int ans = -1;
for(int i = 0; i < 1 << len; i++) ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:16: error: 'Scanner' does not name a type
3 | static Scanner sc = new Scanner(System.in);
| ^~~~~~~
a.cc:4:15: error: expect... |
s408029620 | p00816 | C++ | #include<iostream>
#include<vector>
using namespace std;
typedef pair<int,int> P;
int t, in, lim;
P ans;
string ans_s;
string change(string s, int n){
int a = 0;
string out = "";
for(int i = 0; i < s.length(); i++){
out += s[i];
if(s[i] >= '0' && s[i] <= '9') a++;
if(a == n) out += " ";
}
retur... | a.cc: In function 'std::string tos(int)':
a.cc:77:3: error: 'reverse' was not declared in this scope
77 | reverse(out.begin(),out.end());
| ^~~~~~~
|
s173604660 | p00817 | C++ | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
struct edge {
int to;
bool yes;
};
using edges = vector<edge>;
using graph = vector<edges>;
// (divine, devilish)
pii dfs(graph const& g, int v, bool divine, vector<bool>& checked) {
auto res = make_pair((int)divine, (int)!divine)... | a.cc: In function 'int main()':
a.cc:72:30: error: template argument 1 is invalid
72 | vector<vector<vector<data>>> dp(1, vector<vector<data>>(p1 + 1, vector<data>(p2 + 1)));
| ^~~~
a.cc:72:30: error: template argument 2 is invalid
a.cc:72:34: error: template argument 1 is ... |
s259147900 | p00817 | C++ | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
struct edge {
int to;
bool yes;
};
using edges = vector<edge>;
using graph = vector<edges>;
// (divine, devilish)
pii dfs(graph const& g, int v, bool divine, vector<bool>& checked) {
auto res = make_pair((int)divine, (int)!divine)... | a.cc: In function 'int main()':
a.cc:72:30: error: template argument 1 is invalid
72 | vector<vector<vector<data>>> dp(1, vector<vector<data>>(p1 + 1, vector<data>(p2 + 1)));
| ^~~~
a.cc:72:30: error: template argument 2 is invalid
a.cc:72:34: error: template argument 1 is ... |
s765584323 | p00817 | C++ | #include<iostream>
#include<vector>
using namespace std;
#define MAX_V 305
#define MAX_E 1005
struct edge {int to,cost;};
vector<edge> G[MAX_V];
int V,E,A,B;
vector < vector < int > > t,u;
bool visited[MAX_V];
vector<int> a,b;
void dfs(int pos,bool flg){
if(visited[pos])return;
if(flg)a.push_back(pos);
else b.... | a.cc: In function 'void solve()':
a.cc:88:3: error: 'sort' was not declared in this scope; did you mean 'short'?
88 | sort(ans.begin(),ans.end());
| ^~~~
| short
|
s418364508 | p00817 | C++ | from collections import defaultdict
class UnionFind():
def __init__(self, n):
self.parent = list(range(n))
self.rank = [0] * n
def find(self, x):
if self.parent[x] == x:
return x
else:
self.parent[x] = self.find(self.parent[x])
return self.p... | a.cc:42:17: warning: multi-character character constant [-Wmultichar]
42 | if a == 'yes':
| ^~~~~
a.cc:72:15: warning: multi-character character constant [-Wmultichar]
72 | print('no')
| ^~~~
a.cc:102:19: warning: multi-character character constant [-Wmult... |
s257575396 | p00817 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <set>
#define N 601
using namespace std;
int roots[N];
enum Assignment { UNASSIGNED, DIVINE, DEVILISH, CONFLICT };
struct node {
int index;
int n_people;
vector<int> negatives;
int assignment;
};
struct negative { //negative links
int x;
... | a.cc: In function 'int main()':
a.cc:235:17: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
235 | if (find(solved_vec.begin(), solved_vec.end(), roots[i]) != solved_vec.end()) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s260299216 | p00817 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <set>
#define N 601
using namespace std;
int roots[N];
enum Assignment { UNASSIGNED, DIVINE, DEVILISH, CONFLICT };
struct node {
int index;
int n_people;
vector<int> negatives;
int assignment;
};
struct negative { //negative links
int x;
... | a.cc: In function 'int main()':
a.cc:235:17: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
235 | if (find(solved_vec.begin(), solved_vec.end(), roots[i]) != solved_vec.end()) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s903237234 | p00817 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <set>
#define N 601
using namespace std;
int groups[N]; // roots are group of each person
int solutions = 0;
bool negative_matrix[N][N];
vector<int> solved_vec;
enum Assignment { UNASSIGNED, DIVINE, DEVILISH, CONFLICT };
struct node {
int index;
... | a.cc: In function 'int main()':
a.cc:224:17: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)'
224 | if (find(solved_vec.begin(), solved_vec.end(), root(i)) != solved_vec.end()) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... |
s901636462 | p00817 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#define N 601
using namespace std;
int groups[N]; //roots are group of each person
int solutions = 0; //number of unique solutions
vector<int> solved_vec; // to store solutions (divine groups)
enum assign { UNASSIGNED, D... | a.cc: In function 'void goal_test(std::vector<node>*)':
a.cc:66:61: error: a function-definition is not allowed here before '{' token
66 | void propagate(vector<node> *nodes, bool assign, int index) {
| ^
a.cc:86:92: error: a function-definition is no... |
s711616405 | p00817 | C++ | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
new Main().run();
}
void run() {
solver();
}
@SuppressWarnings("unchecked")
void solver() {
Scanner sc = new Scanner(System.in);
while (true) {
int n = sc.nextIn... | a.cc:14:9: error: stray '@' in program
14 | @SuppressWarnings("unchecked")
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.ArrayList;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2... |
s973614113 | p00817 | C++ | #include <queue>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
const int mod = 998244353;
int m, p1, p2, a, b; string s;
int main() {
while (cin >> m >> p1 >> p2, m) {
vector<vector<pair<int, int> > > G(p1 + p2);
for (int i = 0; i < m; i++) {
cin >> a >> b >> s; a--, b--;
G[a].... | a.cc: In function 'int main()':
a.cc:65:55: error: 'binary_search' was not declared in this scope
65 | if (col[j] ^ (binary_search(res.begin(), res.end(), i) ? 0 : 1)) ret[j] = false;
| ^~~~~~~~~~~~~
|
s362775347 | p00817 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
template<typename A,typename B>inline ... | a.cc:31:1: error: ISO C++ forbids declaration of 'init' with no type [-fpermissive]
31 | init(){
| ^~~~
a.cc: In function 'int init()':
a.cc:37:1: warning: no return statement in function returning non-void [-Wreturn-type]
37 | }
| ^
|
s952738989 | p00819 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:61: error: '.class' expected
else s=s.substring(0,i)+String.valueOf(char(c+1))+s.substring(i+1);
^
Main.java:61: error: not a statement
else s=s.substring(0,i)+String.valueOf(char(c+1))+s.substring(i+1);
^
Main.jav... |
s425825713 | p00819 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:23: error: cannot find symbol
for(int i=0;i<s.length;i++){
^
symbol: variable length
location: variable s of type String
Main.java:24: error: array required, but String found
if(s[i]=='J') J(s);
^
Main.java:25: error: array required, but String found
else if(s[i]=='C') C(... |
s993829004 | p00819 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:23: error: cannot find symbol
for(int i=0;i<cm.length;i++){
^
symbol: variable cm
location: class Main
1 error
|
s916417871 | p00819 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:21: error: cannot find symbol
com=new StringBuilder(ir.next()).reverse.toString.toCharArray();
^
symbol: variable reverse
location: class StringBuilder
1 error
|
s700117700 | p00819 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:21: error: cannot find symbol
com=new StringBuilder(ir.next()).reverse().toString.toCharArray();
^
symbol: variable toString
location: class StringBuilder
1 error
|
s278322439 | p00819 | Java | import java.util.*;
class Main{
public static void main(ping[] args){
Scanner s=new Scanner(System.in);
int a=s.nextInt();
for(int i=0;i<a;i++){
ping command=s.next();
String str=s.next();
for(int j=command.length()-1;j>=0;j--){
switch(command.charAt(j)){
case 'J':
str=str.charAt(str.leng... | Main.java:3: error: cannot find symbol
public static void main(ping[] args){
^
symbol: class ping
location: class Main
Main.java:7: error: cannot find symbol
ping command=s.next();
^
symbol: class ping
location: class Main
2 errors
|
s586408161 | p00819 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner s=new Scanner(System.in);
int a=s.nextInt();
for(int i=0;i<a;i++){
ping command=s.next();
String str=s.next();
for(int j=command.length()-1;j>=0;j--){
switch(command.charAt(j)){
case 'J':
str=str.charAt(str.le... | Main.java:7: error: cannot find symbol
ping command=s.next();
^
symbol: class ping
location: class Main
1 error
|
s006486030 | p00819 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_fast32_... | a.cc: In function 'int main()':
a.cc:52:74: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
52 | s = s.substr(1, s.size()-1) + string(s[0]);
| ... |
s670859017 | p00819 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int n; cin >> n;
while(n--) {
string member; cin >> member;
string s; cin >> s;
int siz = s.size();
for(int i = member.size()-1; i >= 0; i--) {
char c = member[i];
if(c == 'C') {;
s = s.substr(1, siz) + s[0]... | a.cc: In function 'int main()':
a.cc:21:9: error: 'reverse' was not declared in this scope
21 | reverse(s.begin(), s.end());
| ^~~~~~~
|
s715116979 | p00819 | C++ | #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
void c_j(string str);
void c_c(string str);
void c_e(str... | a.cc: In function 'void c_j(std::string)':
a.cc:48:13: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
48 | str.pop_back;
| ~~~~^~~~~~~~
... |
s846190671 | p00819 | C++ | #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
void c_j(string str);
void c_c(string str);
void c_e(str... | a.cc: In function 'void c_j(std::string)':
a.cc:48:13: error: no match for 'operator-=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
48 | str -= c;
| ~~~~^~~~
|
s134327884 | p00819 | C++ | #include<iostream>
using namespace std;
int main()
{
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
char messengers[7];
char message[26];
cin >> messengers;
cin >> message;
int messengersNum = strlen(messengers);
int messLen = strlen(message);
for (int j = 0; j < messengersNum; j++)
{
char c = me... | a.cc: In function 'int main()':
a.cc:13:37: error: 'strlen' was not declared in this scope
13 | int messengersNum = strlen(messengers);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'... |
s511796024 | p00819 | C++ | #include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
char messengers[7];
char message[26];
cin >> messengers;
cin >> message;
int messengersNum = strlen(messengers);
int messLen = strlen(message);
for (int j = 0; j < messengersNum; j++)... | a.cc: In function 'int main()':
a.cc:14:37: error: 'strlen' was not declared in this scope
14 | int messengersNum = strlen(messengers);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'... |
s079834124 | p00819 | C++ | #include <string>
#include <iostream>
using namespace std;
string turn1(string S)
{
return S.substr(1, S.size() - 1) + S[0];
}
string turn2(string S)
{
return S[S.size() - 1] + S.substr(0, S.size() - 1);
}
string turn3(string S)
{
string T;
if (S.size() % 2 == 1)
{
T = S.substr(S.size() / 2 + 1, S.size() / ... | a.cc: In function 'std::string turn4(std::string)':
a.cc:34:9: error: 'reverse' was not declared in this scope
34 | reverse(S.begin(), S.end());
| ^~~~~~~
a.cc: In function 'std::string turn5(std::string)':
a.cc:55:1: warning: no return statement in function returning non-void [-Wreturn-type]
... |
s600102865 | p00819 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
char a[7],ans[26],b[26],x=0,y=0;
scanf("%s",a);
x=strlen(a);
scanf("%s",ans);
y=strlen(ans);
for(int j=0;j<y;j++)
b[j]=ans[j];
for(int k=x-1;k>=0;k--){... | a.cc: In function 'int main()':
a.cc:61:6: error: 'h' was not declared in this scope
61 | }h
| ^
a.cc:62:17: error: 'j' was not declared in this scope
62 | for(int j=0;j<y;j++)
| ^
|
s736617433 | p00819 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n
cin>>n;
while(n--){
string q,s;
cin>>q>>s;
for(int i=0;i<q.size();i++){
if(q[i]=='J')s=s.substr(1,s.size()-1)+s[0];
if(q[i]=='C')s=s[s.size()-1]+s.substr(0,s.size()-1);
if(q[i]=='E')
for(int j=0;j<s.size()/2;j++)swap(s[j... | a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'cin'
5 | cin>>n;
| ^~~
a.cc:6:9: error: 'n' was not declared in this scope; did you mean 'yn'?
6 | while(n--){
| ^
| yn
|
s173834198 | p00819 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
string order;
cin>>order;
string s;
cin>>s;
reverse(order.begin(),order.end());
for(auto x:order){
switch(x){
... | a.cc: In function 'int main()':
a.cc:23:22: error: jump to case label
23 | case 'C':
| ^~~
a.cc:19:45: note: crosses initialization of 'std::string s2'
19 | string s1=s.substr(0,1),s2=s.substr(1);
| ... |
s806751777 | p00819 | C++ | #include <bits/stdc++.h>
int main(){
int n;
cin>>n;
while(n--){
string s,ss;
cin>>s>>ss;
for(int i=s.size()-1;i>=0;i--){
if(s[i]=='P')
for(int j=0;j<ss.size();j++)
if(ss[j]>='0'&&ss[j]<='9')
ss[j]=(ss[j]-'0'+9)%10+'0';
if(s[i]=='M')
for(int j=0;j<ss.size();j++)
if(ss[j]>='0'&&ss[j... | a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>n;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62... |
s612560127 | p00819 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
auto decryptJ = [](const string &s) {
return s.back() + s.substr(0, s.size() - 1);
};
auto decryptC = [](const string &s) { return s.substr(1) + s.front(); };
auto decryptE = [](const string &s)... | a.cc: In lambda function:
a.cc:29:9: error: 'reverse' was not declared in this scope
29 | reverse(begin(r), end(r));
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:61:9: error: 'reverse' was not declared in this scope
61 | reverse(begin(order), end(order));
| ^~~~~~~
|
s362260775 | p00819 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cctype>
using namespace std;
string revJ(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ ret.insert(ret.begin(),t[t.length()-1]);
ÃÂ ÃÂ ret.erase(ret.end()-1);
ÃÂ ÃÂ return ret;
}
string revC(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ r... | a.cc:10:1: error: extended character is not valid in an identifier
10 | ÃÂ ÃÂ string ret = t;
| ^
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.... |
s490004532 | p00819 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cctype>
using namespace std;
string revJ(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ ret.insert(ret.begin(),t[t.length()-1]);
ÃÂ ÃÂ ret.erase(ret.end()-1);
ÃÂ ÃÂ return ret;
}
string revC(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ r... | a.cc:10:1: error: extended character is not valid in an identifier
10 | ÃÂ ÃÂ string ret = t;
| ^
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.... |
s736113275 | p00819 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cctype>
using namespace std;
string revJ(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ ret.insert(ret.begin(),t[t.length()-1]);
ÃÂ ÃÂ ret.erase(ret.end()-1);
ÃÂ ÃÂ return ret;
}
string revC(string t){
ÃÂ ÃÂ string ret = t;
ÃÂ ÃÂ r... | a.cc:10:1: error: extended character is not valid in an identifier
10 | ÃÂ ÃÂ string ret = t;
| ^
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.cc:10:1: error: extended character is not valid in an identifier
a.... |
s742602212 | p00819 | C++ | #include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int main () {
int n;
cin >> n;
for( int i = 0; i < n; i++ ) {
string commands, mes;
cin >> commands >> mes;
int len = commands.length();
int meslen = mes.length();
for( int j = len - 1; j >= 0; j-- ) {
switc... | a.cc: In function 'int main()':
a.cc:37:11: error: 'reverse' was not declared in this scope
37 | reverse( mes.begin(), mes.end() );
| ^~~~~~~
|
s069714312 | p00819 | C++ | #include <stdio.h>
#include <string.h>
int main() {
int N,i,j,k,q;char T[50],c[9];scanf("%d",&N);while (N--) {
scanf("%s%s",&c,&T);j=strlen(c),k=strlen(T)-1;
while (j--) {
if (c[j]=='P') {
for (i=k;i>=0;i--) if (T[i]>='1' && T[i]<='9') T[i]--; else if (T[i]=='0') T[i]='9'... | a.cc: In function 'int main()':
a.cc:9:15: error: 'else' without a previous 'if'
9 | } else if (c[j]=='M') {
| ^~~~
a.cc:11:15: error: 'else' without a previous 'if'
11 | } else if (c[j]=='E') {
| ^~~~
a.cc:12:50: error: 'swap' was not declared in t... |
s791533315 | p00819 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int n;
cin >> n;
while( n-- ){
string p, m;
cin >> p >> m;
reverse( p.begin(), p.end() );
for( size_t i = 0; i < p.length(); i++ ){
switch(p[i]){
case 'J':{
... | a.cc: In function 'int main()':
a.cc:11:9: error: 'reverse' was not declared in this scope
11 | reverse( p.begin(), p.end() );
| ^~~~~~~
|
s691578328 | p00819 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int n;
cin >> n;
while( n-- ){
string p, m;
cin >> p >> m;
reverse( p.begin(), p.end() );
for( size_t i = 0; i < p.length(); i++ ){
if( p[i] == 'J' ){
char tmp = m[m.length() -... | a.cc: In function 'int main()':
a.cc:11:9: error: 'reverse' was not declared in this scope
11 | reverse( p.begin(), p.end() );
| ^~~~~~~
|
s984896954 | p00819 | C++ | #include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
int main(){
int n;
cin >> n;
while( n-- ){
string p, m;
cin >> p >> m;
reverse( p.begin(), p.end() );
for( size_t i = 0; i < p.length(); i++ ){
switch(p[i]){
case 'J':{
... | a.cc: In function 'int main()':
a.cc:12:9: error: 'reverse' was not declared in this scope
12 | reverse( p.begin(), p.end() );
| ^~~~~~~
|
s013641417 | p00819 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int n;
cin >> n;
while( n-- ){
string p, m;
cin >> p >> m;
reverse( p.begin(), p.end() );
for( size_t i = 0; i < p.length(); i++ ){
if( p[i] == 'J' ){
char tmp = m[m.length() -... | a.cc: In function 'int main()':
a.cc:11:9: error: 'reverse' was not declared in this scope
11 | reverse( p.begin(), p.end() );
| ^~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.