submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s240857904 | p00174 | C++ | //3ゲーム目の最後の得点をどちらがとったのかが分からないので、このときは2点連続同じ人がとったと仮定する。
#include<iostream>
#include<string.h>
using namespace std;
char s[3][102];
int main(){
int i,j;
while( cin >> s[0] ){
if( s[0][0] == '0' )
break;
cin >> s[1] >> s[2];
for( i = 0;i < 3;i++ ){
int cnt[2] = {0};
for( j = 1;j < strlen( s[i] );j++ ... | a.cc: In function 'int main()':
a.cc:23:25: error: 'else' without a previous 'if'
23 | else{
| ^~~~
|
s004076386 | p00174 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
strng s;
while(cin>>s,s!="0"){
int a,b;
a=b=0;
for(int i=1;i<s.size();i++){
if(s[i]=='A') a++; else b++;
}
if(a>b) a++; else b++;
cout<<a<<" "<<b<<endl;
}
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'strng' was not declared in this scope
6 | strng s;
| ^~~~~
a.cc:7:20: error: 's' was not declared in this scope
7 | while(cin>>s,s!="0"){
| ^
|
s684552675 | p00174 | C++ | #include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int main(){
char ta[1000]="",tmp[1000];
int a,b;
while(true){
for(int i=0;i<3;i++){
cin>>ta;
if(strcmp(ta,"0"==0)break;
a=b=0;
for(int j=(i>=1);ta[j]!='\0';j++){
(ta[j]=='A')?a++:b++;
}
(a>b)?a++:b++;
cout<<" "<<a<<" "<<b<<endl... | a.cc: In function 'int main()':
a.cc:13:25: error: cannot convert 'bool' to 'const char*'
13 | if(strcmp(ta,"0"==0)break;
| ~~~^~~
| |
| bool
In file included from /usr/include/c++/14/cstring:43,
from a.cc... |
s149392571 | p00174 | C++ | #include <iostream>
using namespace std;
int main(){string a[3];while(cin>>a[0]){if(a=="0")break;int p[2]={};cin>>a[1]>>a[2];for(int i=0;i<a[0].size();i++)p[a[0][i]=='B']++;for(int i=1;i<a[1].size();i++)p[a[1][i]=='B']++;for(int i=1;i<a[2].size();i++)p[a[2][i]]++;cout<<p[0]<<" "<<p[1]<<endl;}} | a.cc: In function 'int main()':
a.cc:3:45: error: comparison between distinct pointer types 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} and 'const char*' lacks a cast
3 | int main(){string a[3];while(cin>>a[0]){if(a=="0")break;int p[2]={};cin>>a[1]>>a[2];for(int i=0;i<a[0].size();i++)p[a[0][i]=='B']++;... |
s299956813 | p00174 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main(){
char serve[3][101];
char latestServe;
int APoint[3];
int BPoint[3];
bool isDeuce = false;
while(true){
cin >> serve[0];
if(strlen(serve) == 1){
break;
}
cin >> serve[1] >> serve[2];
APoint = 0;
BPoint = 0;
for(int i=0;i<3... | a.cc: In function 'int main()':
a.cc:13:27: error: cannot convert 'char (*)[101]' to 'const char*'
13 | if(strlen(serve) == 1){
| ^~~~~
| |
| char (*)[101]
In file included from /usr/include/c++/14/cstring... |
s584064201 | p00174 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main(){
char serve[3][101];
char latestServe;
int APoint[3];
int BPoint[3];
bool isDeuce = false;
while(true){
cin >> serve[0];
if(strlen(serve) == 1){
break;
}
cin >> serve[1] >> serve[2];
APoint = 0;
BPoint = 0;
for(int i=0;i<3... | a.cc: In function 'int main()':
a.cc:13:27: error: cannot convert 'char (*)[101]' to 'const char*'
13 | if(strlen(serve) == 1){
| ^~~~~
| |
| char (*)[101]
In file included from /usr/include/c++/14/cstring... |
s440732487 | p00174 | C++ | #include <bits/stdc++.h>
#define r(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main(){
while(cin>>s){
if(s[0]=='0')break;
int a=0,b=0;
r(i,0,s.size()){
if(s[i]=='A')a++;
else b++;
}
cout<<a<<' '<<b<<endl;
}
} | a.cc: In function 'int main()':
a.cc:5:20: error: 's' was not declared in this scope
5 | while(cin>>s){
| ^
|
s231250588 | p00174 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(void)
{
int i,j,k,a,b,f=0,cnt=0;
char sabu[101];
while(1) {
f=cnt=0;
for(i=0;i<3;i++) {
cin>>sabu;
a=b=0;
if(sabu[0]=='0') {
cnt=1;
break;
}
for(j=1;j<strlen(sabu);j++) {
if(sabu[j]=='A') a++;
else b++;
if(a==b&&a>10) a=b=... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s370536466 | p00174 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(void)
{
int i,j,k,a,b,f=0,cnt=0;
char sabu[102];
while(1) {
f=cnt=0;
for(i=0;i<3;i++) {
cin>>sabu;
a=b=0;
if(sabu[0]=='0') {
cnt=1;
break;
}
for(j=1;j<strlen(sabu);j++) {
if(sabu[j]=='A') a++;
else b++;
if(a==b&&a>10) a=b=... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s155358414 | p00174 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(void)
{
int i,j,k,a,b,f=0,cnt=0,s1[3],s2[3];
char sabu[102];
while(1) {
f=cnt=0;
for(i=0;i<3;i++) {
cin>>sabu;
a=b=0;
if(sabu[0]=='0') {
cnt=1;
break;
}
for(j=1;j<strlen(sabu);j++) {
if(sabu[j]=='A') a++;
else b++;
if(a==b... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s545094890 | p00174 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(void)
{
int i,j,k,a,b,f=0,cnt=0,s1[3],s2[3];
char sabu[102];
while(1) {
f=cnt=0;
for(i=0;i<3;i++) {
cin>>sabu;
a=b=0;
if(sabu[0]=='0') {
cnt=1;
break;
}
for(j=1;j<strlen(sabu);j++) {
if(sabu[j]=='A') a++;
else b++;
if(a==b... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s255806738 | p00174 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(void)
{
int i,j,k,a,b,f=0,cnt=0,s1[3],s2[3];
char sabu[102];
while(1) {
f=cnt=0;
for(i=0;i<3;i++) {
cin>>sabu;
a=b=0;
if(sabu[0]=='0') {
cnt=1;
break;
}
for(j=1;j<strlen(sabu);j++) {
if(sabu[j]=='A') a++;
else b++;
if(a==b... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s228929163 | p00174 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(void)
{
int i,j,k,a,b,f=0,cnt=0,s1[3],s2[3];
char sabu[102];
while(1) {
cnt=0;
for(i=0;i<3;i++) {
cin>>sabu;
a=b=0;
if(sabu[0]=='0') {
cnt=1;
break;
}
for(j=1;j<strlen(sabu);j++) {
if(sabu[j]=='A') a++;
else b++;
if(a==b&&... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s596987369 | p00174 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string str;
for(;;){
int cntA = 0,cntB = 0;
cin >> str;
if(str == '0') break;
for(int i = 1 ; i < str.size() ; i++){
if(str[i] == 'A') cntA++;
else cntB++;
}
if(cntA > cntB) cntA++;
el... | a.cc: In function 'int main()':
a.cc:12:12: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
12 | if(str == '0') break;
| ~~~ ^~ ~~~
| | |
| | char
| std::string {aka std::__cxx11::... |
s329676021 | p00174 | C++ | #include <string>
using namespace std;
int main() {
int a,b;
string s;
while(cin>>s,s!="0"){
a=b=0;
for(int i=0;i<s.size();i++){
if(s[i]=='A')a++;
if(s[i]=='B')b++;
}
if(a!=11||b!=11){
if(a==10){a++;b--;}
if(b==10){a--;b++;}
}
if(a==11&&b==11){
if(s[s.size()]=='A'){a++;b--;}
else{a--;b... | a.cc: In function 'int main()':
a.cc:7:15: error: 'cin' was not declared in this scope
7 | while(cin>>s,s!="0"){
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <string>
+++ |+#include <iostre... |
s977737497 | p00175 | Java | import java.math.BigInteger;
import java.util.Scanner;
public class Mani {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
BigInteger b = sc.nextBigInteger();
System.out.println(b.toString(4));
}
}
} | Main.java:4: error: class Mani is public, should be declared in a file named Mani.java
public class Mani {
^
1 error
|
s834866587 | p00175 | C | z[];main(){for(;scanf("%d",z),~*z;puts(z))itoa(*z,z,4);} | main.c:1:1: warning: data definition has no type or storage class
1 | z[];main(){for(;scanf("%d",z),~*z;puts(z))itoa(*z,z,4);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'z' [-Wimplicit-int]
main.c:1:5: error: return type defaults to 'int' [-Wimplicit-int]
1 | z[];main(){for(;scanf("%... |
s336295334 | p00175 | C | z[];main(){for(;scanf("%d",z),~*z;puts(z))itoa(*z,z,4);} | main.c:1:1: warning: data definition has no type or storage class
1 | z[];main(){for(;scanf("%d",z),~*z;puts(z))itoa(*z,z,4);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'z' [-Wimplicit-int]
main.c:1:5: error: return type defaults to 'int' [-Wimplicit-int]
1 | z[];main(){for(;scanf("%... |
s189691518 | p00175 | C | itoa();z[];main(){for(;scanf("%d",z),~*z;puts(z))itoa(*z,z,4);} | main.c:1:1: warning: data definition has no type or storage class
1 | itoa();z[];main(){for(;scanf("%d",z),~*z;puts(z))itoa(*z,z,4);}
| ^~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'itoa' [-Wimplicit-int]
main.c:1:8: warning: data definition has no type or storage class
1 | itoa();z[];... |
s717632056 | p00175 | C | #include <stdio.h>
int main(void)
{
int n;
int keta;
__int64 ans;
while (1){
scanf("%d", &n);
if (n == -1){
break;
}
keta = 1;
ans = 0;
while (n != 0){
ans += keta * (n % 4);
n /= 4;
keta *= 10;
}
printf("%I64d\n", ans);
}
return (0);
} | main.c: In function 'main':
main.c:7:9: error: unknown type name '__int64'; did you mean '__int64_t'?
7 | __int64 ans;
| ^~~~~~~
| __int64_t
|
s128199768 | p00175 | C | #include <stdio.h>
int main(void)
{
int n;
int keta;
__int64 ans;
while (1){
scanf("%d", &n);
if (n == -1){
break;
}
keta = 1;
ans = 0;
while (n != 0){
ans += keta * (n % 4);
n /= 4;
keta *= 10;
}
printf("%I64u\n", ans);
}
return (0);
} | main.c: In function 'main':
main.c:7:9: error: unknown type name '__int64'; did you mean '__int64_t'?
7 | __int64 ans;
| ^~~~~~~
| __int64_t
|
s674326225 | p00175 | C | #include <stdio.h>
int main(void)
{
int n;
int keta;
longlong ans;
while (1){
scanf("%d", &n);
if (n == -1){
break;
}
keta = 1;
ans = 0;
while (n != 0){
ans += keta * (n % 4);
n /= 4;
keta *= 10;
}
printf("%I64u\n", ans);
}
return (0);
} | main.c: In function 'main':
main.c:7:9: error: unknown type name 'longlong'
7 | longlong ans;
| ^~~~~~~~
|
s336134409 | p00175 | C | #include <stdio.h>
int main(void)
{
int n;
int keta;
LONGLONG ans;
while (1){
scanf("%d", &n);
if (n == -1){
break;
}
keta = 1;
ans = 0;
while (n != 0){
ans += keta * (n % 4);
n /= 4;
keta *= 10;
}
printf("%lld\n", ans);
}
return (0);
} | main.c: In function 'main':
main.c:7:9: error: unknown type name 'LONGLONG'
7 | LONGLONG ans;
| ^~~~~~~~
|
s060004074 | p00175 | C++ | #include<iostream>
| /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
|
s234617596 | p00175 | C++ | #include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main(){
int n,t;
while(1){
string a;
cin >> n;
if(n==-1){
return 0;
}
if(n==0){
a += '0';
}
for(t=0;n!=0;t++){
a += '0' + n%4;
n=n/4;
}
reverse(a.begin(), a.end());
cout << a << endl;
}... | a.cc: In function 'int main()':
a.cc:22:17: error: 'reverse' was not declared in this scope
22 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s983210107 | p00175 | C++ | #include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main(){
int n,t;
while(1){
string a;
cin >> n;
if(n==-1){
return 0;
}
if(n==0){
a += '0';
}
for(t=0;n!=0;t++){
a += '0' + n%4;
n=n/4;
}
reverse(a.begin(), a.end());
cout << a << endl;
}... | a.cc: In function 'int main()':
a.cc:22:17: error: 'reverse' was not declared in this scope
22 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s907966841 | p00175 | C++ | #include<stdio.h>
int main(void)
{
int i,c,w[10000];
int n,x;
while(1){
c=0;
scanf("%d",&n);
if(n==-1) break;
while(1){
x=n/4;
if(x<0) break;
w[c]=n%4;
n=x;
c++;
}
printf("%d",n);
for(i=c-1;i>=0;i--){
printf("%d\n",w[i]);
}
print("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:21:9: error: 'print' was not declared in this scope; did you mean 'printf'?
21 | print("\n");
| ^~~~~
| printf
|
s610455613 | p00175 | C++ | #include<math.h>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,x,n) for(int i=x;i<n;i++)
using namespace std;
const int INF=100000000;
int main(){
int n;
while(cin>>n,n!=-1){
vector<int> a;
if(n<4)cout<<n<<endl;
else{
for(int ... | a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
12 | while(cin>>n,n!=-1){
| ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
5 | #include<queue>
+++ |+#include <iostream>
6 | #de... |
s744659268 | p00175 | C++ | #include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
using namespace std;
int main(){
int n;
while(cin>>n&&n!=-1){
int ans=0;
for(int i=0;;i++){
ans+=(n%4*pow(10,i));
if(n/4==0) break;
n=n/4;
}
... | a.cc:24:1: error: 'AOJ' does not name a type
24 | AOJ 0175 why wrong answer?
| ^~~
|
s167536574 | p00175 | C++ | #include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
using namespace std;
int main(){
int n;
while(cin>>n){
if(n=-1)break;
int ans=0;
for(int i=0;;i++){
ans+=(n%4*pow(10,i));
if(n/4==0) break;
n=n/4... | a.cc:25:1: error: 'AOJ' does not name a type
25 | AOJ 0175 why wrong answer?
| ^~~
|
s731759622 | p00175 | C++ | #include <iostream>
using namespace std;
string four(int n){
string ret;
while(n){
ret += (char)(n%4+'0');
n/=4;
}
reverse(ret.begin(),ret.end());
return ret;
}
int main(){
int n;
while(cin >> n && n != -1){
cout << four(n) << endl;
}
} | a.cc: In function 'std::string four(int)':
a.cc:10:9: error: 'reverse' was not declared in this scope
10 | reverse(ret.begin(),ret.end());
| ^~~~~~~
|
s000667598 | p00175 | C++ | res += j * v[i];
j *= 10;
}
return res;
}
int main(){
int i;
while(std::cin >> i, i >= 0){
std::cout << Decimal4(i) << '\n';
}
} | a.cc:1:17: error: 'res' does not name a type
1 | res += j * v[i];
| ^~~
a.cc:2:17: error: 'j' does not name a type
2 | j *= 10;
| ^
a.cc:3:9: error: expected declaration before '}' token
3 | }
| ^
a.cc:5:9: err... |
s589069774 | p00175 | C++ | #include <iostream>
#include <cstdlib>
using namespace std;
int main(){
int n;
while(cin >> n){
if(n==-1)break;
char s[20];
itoa(n,s,4);
cout << s << "\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'itoa' was not declared in this scope
9 | itoa(n,s,4);
| ^~~~
|
s605531514 | p00175 | C++ | #include <iostream>
#include <stdlib.h>
using namespace std;
int main(){
int n;
while(cin >> n){
if(n==-1)break;
char s[20];
itoa(n,s,4);
cout << s << "\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'itoa' was not declared in this scope
9 | itoa(n,s,4);
| ^~~~
|
s796982754 | p00175 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(void){
while(1){
int n;
string str;
scanf("%d",&n);
if(n==-1)break;
if(n==0)cout << "0" << endl;
else{
while(n>0){
str+=n%4+'0';
n=n/4;
}
reverse(str.begin(),str.end());
cout << str << endl;
}
}
... | a.cc: In function 'int main()':
a.cc:19:25: error: 'reverse' was not declared in this scope
19 | reverse(str.begin(),str.end());
| ^~~~~~~
|
s297787800 | p00175 | C++ | #include <stdio.h>
int main(void)
{
int a[100];
int n;
int index;
while (1){
scanf("%d", &n);
if (n == -1) break;
index = 0;
do {
a[index++] = (n & 0x3);
n =>> 2;
} while (n != 0);
index--;
while (index >= 0){
printf("%d", a[index--]);
}
puts("");
}
} | a.cc: In function 'int main()':
a.cc:15:4: error: expected primary-expression before '>>' token
15 | n =>> 2;
| ^~
|
s879202407 | p00175 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
string str;
while(cin >> n , n != -1){
str = "";
if(!n) cout << '0' << endl;
else{
while(n){
str += n % 4 + '0';
n /= 4;
}
reverse(str.begin(),str.end());
cout << str << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:7: error: 'reverse' was not declared in this scope
16 | reverse(str.begin(),str.end());
| ^~~~~~~
|
s239754299 | p00175 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int n;
string str;
while(cin >> n , n != -1){
str = "";
if(!n) cout << '0' << endl;
else{
while(n){
str += n % 4 + '0';
n /= 4;
}
reverse(str.begin(),str.end());
cout << str << endl;
}
}
return ... | a.cc: In function 'int main()':
a.cc:17:7: error: 'reverse' was not declared in this scope
17 | reverse(str.begin(),str.end());
| ^~~~~~~
|
s608035953 | p00176 | Java | static double dis(double r, double g, double b) {
return Math.sqrt( r*r+ g*g+ b*b);
}
public static void main(String[] args) throws Exception {
String [] names ={“000black”,“001blue”,“010lime”,“011aqua”,“100red”,“101fuchsia”,“110yellow”,“111white”};
Scanner sc = new Scanner(System.i... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
static double dis(double r, double g, double b) {
^
(use --enable-preview to enable unnamed classes)
Main.java:5: error: illegal character: '\u201c'
String [] names ={?000black?,?001blue?,?010lime?,?011aqua?,?100red?... |
s064832494 | p00176 | Java | import java.util.*;
static double dis(double r, double g, double b) {
return Math.sqrt( r*r+ g*g+ b*b);
}
public class Main {
public static void main(String[] args) throws Exception {
String [] names ={“000black”,“001blue”,“010lime”,“011aqua”,“100red”,“101fuchsia”,“110yellow”,“111white”}; ... | Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
static double dis(double r, double g, double b) {
^
(use --enable-preview to enable unnamed classes)
Main.java:9: error: illegal character: '\u201c'
String [] names ={?000black?,?001blue?,?010lime?,?011aqua?,?100red?... |
s190867542 | p00176 | Java | import java.util.*;
public class Main {
static double dis(double r, double g, double b) {
return Math.sqrt( r*r+ g*g+ b*b);
}
public static void main(String[] args) throws Exception {
String [] names ={“000black”,“001blue”,“010lime”,“011aqua”,“100red”,“101fuchsia”,“110yellow”,“111white”}; ... | Main.java:8: error: illegal character: '\u201c'
String [] names ={?000black?,?001blue?,?010lime?,?011aqua?,?100red?,?101fuchsia?,?110yellow?,?111white?};
^
Main.java:8: error: illegal character: '\u201d'
String [] names ={?000black?,?001blue?,?010lime?,?011aqua?,?100red?,?... |
s523504949 | p00176 | Java | import java.util.*;
public class Main {
static double dis(double r, double g, double b) {
return Math.sqrt( r*r+ g*g+ b*b);
}
public static void main(String[] args) throws Exception {
String [] names ={“000black”,“001blue”,“010lime”,“011aqua”,“100red”,“101fuchsia”,“110yellow”,“111white... | Main.java:9: error: illegal character: '\u201c'
String [] names ={?000black?,?001blue?,?010lime?,?011aqua?,?100red?,?101fuchsia?,?110yellow?,?111white?};
^
Main.java:9: error: illegal character: '\u201d'
String [] names ={?000black?,?001blue?,?010lime?,?011aqua?,?100red?,?1... |
s290644187 | p00176 | Java | import java.util.*;
public class Main {
static double distance(double r,double g,double b){
return Math.sqrt(r*r+g*g+b*b);
}
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String [] colors = {"000black","001blue","010lime","011aqua","... | Main.java:21: error: cannot find symbol
for(String c:color){
^
symbol: variable color
location: class Main
1 error
|
s981775001 | p00176 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
String [] unit = {"","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan","Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"};
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()){
in... | Main.java:11: error: cannot find symbol
BigInteger b = valueOf(Math.pow(m,n));
^
symbol: class BigInteger
location: class Main
Main.java:11: error: cannot find symbol
BigInteger b = valueOf(Math.pow(m,n));
^
symbol: method valueOf(double)
location: ... |
s682543808 | p00176 | Java | import java.util.*;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) throws Exception {
String [] unit = {"","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan","Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"};
Scanner sc = new Scanner(System.in);
while(sc... | Main.java:12: error: cannot find symbol
BigInteger b = valueOf(Math.pow(m,n));
^
symbol: method valueOf(double)
location: class Main
Main.java:16: error: cannot find symbol
String digit = remainder(b,10000);
^
symbol: method rem... |
s639824150 | p00176 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
String [] unit = {"","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan","Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"};
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()){
in... | Main.java:11: error: cannot find symbol
BigInteger b = valueOf(Math.pow(m,n));
^
symbol: class BigInteger
location: class Main
Main.java:11: error: cannot find symbol
BigInteger b = valueOf(Math.pow(m,n));
^
symbol: method valueOf(double)
location: ... |
s605680763 | p00176 | Java | import java.util.*;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) throws Exception {
String [] unit = {"","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan","Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"};
Scanner sc = new Scanner(System.in);
while(sc... | Main.java:12: error: cannot find symbol
BigInteger b = valueOf(Math.pow(m,n));
^
symbol: method valueOf(double)
location: class Main
Main.java:16: error: cannot find symbol
String digit = remainder(b,10000);
^
symbol: method rem... |
s927533790 | p00176 | C | #define _CRT_SECURE_NO_WARNINGS
//#define _USE_MATH_DEFINES
#include<stdio.h>
//#include<stdlib.h>
#include<math.h>
//#include<string.h>
//#include<time.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
struct color {
int r,
g,
b;
char c[8];
};
//int c16toi10(char*);
int hex(char*);
int main() {
struct color a... | main.c: In function 'main':
main.c:18:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
18 | struct color a[8]{
| ^
main.c:19:40: error: expected ';' before '}' token
19 | {0x00,0x00,0x00,"black"},
| ... |
s970195078 | p00176 | C | import java.util.*;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) throws Exception {
String [] unit = {"","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan","Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"};
Scanner sc = new Scanner(System.in);
while(sc... | main.c:1:1: error: unknown type name 'import'
1 | import java.util.*;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.util.*;
| ^
main.c:2:1: error: unknown type name 'import'
2 | import java.math.BigInteger;
| ^~~~~... |
s929062769 | p00176 | C | s[]={"black","blue","lime","aqua","red","fuchsia","yellow","white"};main(c){for(;scanf("#%x\n",&c);)puts(s[c>>7&1|c>>14&2|c>>21&4]);} | main.c:1:1: warning: data definition has no type or storage class
1 | s[]={"black","blue","lime","aqua","red","fuchsia","yellow","white"};main(c){for(;scanf("#%x\n",&c);)puts(s[c>>7&1|c>>14&2|c>>21&4]);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:1:14: error: e... |
s206425007 | p00176 | C | #include <stdio.h>
#include <math.h>
#include <ctype.h>
int ss(char input);
int hen(int a,int b);
int main(){
int i,henkan[7];
char n[7];
while(scanf("%s",n)){
if(n[0]=='0')break;
for(i=1;i<7;i++){
if(isdigit(n[i])!=0){//数字ならば
henkan[i]=n[i]-'0';
}els... | /usr/bin/ld: /tmp/ccZuzhNv.o: in function `main':
main.c:(.text+0x2b7): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
|
s865529898 | p00176 | C | #include<stdio.h>
char a[8][8]={"black","blue","lime","aqua","red","fuchsia","yellow","white"},c;
int b[9][3]={{0,0,0},{0,0,255},{0,255,0},{0,255,255},{255,0,0},{255,0,255},{255,255,0},{255,255,255}};
int d(int x)
{
int i,r=0;
for(i=0;i<3;i++)
r+=(b[8][i]-b[x][i])*(b[8][i]-b[x][i]);
return r;
}
int main()
{
int... | main.c: In function 'main':
main.c:22:1: error: stray '\343' in program
22 | <U+3000><U+3000><U+3000><U+3000><U+3000>return 0;
| ^~~~~~~~
main.c:22:3: error: stray '\343' in program
22 | <U+3000><U+3000><U+3000><U+3000><U+3000>return 0;
| ^~~~~~~~
main.c:22:5: error: stray '\343' in program
... |
s921340742 | p00176 | C++ | #include<iostream>
#include<cfloat>
#include<cmath>
using namespace std;
int hexToDec(char x){
if('0' <= x && x <= '9'){
return x-'0';
}else{
return 10 + (x - 'a');
}
}
int data[8][3] = { {0, 0, 0} ,
{0, 0, 255} ,
{0, 255, 0} ,
{... | a.cc:52:2: error: stray '#' in program
52 | }#include<iostream>
| ^
a.cc: In function 'int main()':
a.cc:41:39: error: reference to 'data' is ambiguous
41 | double tmp = sqrt(pow(r - data[i][0], 2.0) + pow(g - data[i][1], 2.0) + pow(b - data[i][2], 2.0));
| ... |
s782196181 | p00176 | C++ |
import java.awt.geom.Point2D;
import java.io.*;
import java.math.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
im... | a.cc:2:1: error: 'import' does not name a type
2 | import java.awt.geom.Point2D;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
... |
s173706772 | p00176 | C++ | #include<iostream>
#include<string>
using namespace std;
string S, x[2][2][2] = { {{"black","blue"}, {"lime","aqua"}}, { {"red","fuchsia"} {"yellow","white"} } };
char T[9] = "89abcdef";
int a, b, c;
int main() {
while (true) {
a = 0; b = 0; c = 0;
cin >> S;
if (S == "0") { break; }
for (int i = 0; i < 8; i++)... | a.cc:4:83: error: expected '}' before '{' token
4 | string S, x[2][2][2] = { {{"black","blue"}, {"lime","aqua"}}, { {"red","fuchsia"} {"yellow","white"} } };
| ~ ^
a.cc:4:83: error: expected '}' before '{' token
4 | string S, ... |
s640785527 | p00176 | C++ | #include<iostream>
#include<string>
using namespace std;
string S, x[2][2][2] = { {{"black","blue"}, {"lime","aqua"}}, { {"red","fuchsia"} {"yellow","white"} } };
char T[9] = "89abcdef";
int a, b, c;
int main() {
while (true) {
a = 0; b = 0; c = 0;
cin >> S;
if (S == "0") { break; }
for (int i = 0; i < 8; i++)... | a.cc:4:83: error: expected '}' before '{' token
4 | string S, x[2][2][2] = { {{"black","blue"}, {"lime","aqua"}}, { {"red","fuchsia"} {"yellow","white"} } };
| ~ ^
a.cc:4:83: error: expected '}' before '{' token
4 | string S, ... |
s274582893 | p00176 | C++ | (function(input) {
var lines = input.split("\n");
var colors = [
['black', 0x00, 0x00, 0x00],
['blue', 0x00, 0x00, 0xff],
['lime', 0x00, 0xff, 0x00],
['aqua', 0x00, 0xff, 0xff],
['red', 0xff, 0x00, 0x00],
['fuchsia', 0xff, 0x00, 0xff],
['yellow', 0xff, 0xff, 0x00],
['white', 0xff, 0x... | a.cc:4:6: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
4 | ['black', 0x00, 0x00, 0x00],
| ^~~~~~~
a.cc:5:6: warning: multi-character character constant [-Wmultichar]
5 | ['blue', 0x00, 0x00, 0xff],
| ^~~~~~
a.cc:6:6: warning: multi-character char... |
s644997837 | p00176 | C++ | #define _USE_MATH_DEFINES
#define MAX_N 1000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
using namespace std;
typedef long long ... | a.cc: In function 'int hex2dec(std::string)':
a.cc:33:21: error: cast from 'const char*' to 'int' loses precision [-fpermissive]
33 | return 16 * (int)lower_bound(hex,hex+16,str[0]) + (int)lower_bound(hex,hex+16,str[1]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:33:59: error: cast ... |
s039650724 | p00176 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main() {
map <char, int>b;
b.insert(map<char, int>::value_type('0', 0));
b.insert(map<char, int>::value_type('1', 1));
b.insert(map<char, int>::value_type('2', 2));
b.insert(map<char, int>::value_type('3', 3));
b.insert(map<char, int>::val... | a.cc: In function 'int main()':
a.cc:34:38: error: 'pow' was not declared in this scope
34 | int h = sqrt(pow((e[i][0] - t[0]), 2) + pow((e[i][1] - t[1]), 2) + pow((e[i][2] - t[2]), 2));
| ^~~
a.cc:34:33: error: 'sqrt' was not declared in this scope
... |
s817765076 | p00176 | C++ | #include<iostream>
#include<string>
#include<map>
using namespace std;
int main() {
map <char, int>b;
b.insert(map<char, int>::value_type('0', 0));
b.insert(map<char, int>::value_type('1', 1));
b.insert(map<char, int>::value_type('2', 2));
b.insert(map<char, int>::value_type('3', 3));
b.insert(map<char, int>::val... | a.cc: In function 'int main()':
a.cc:34:38: error: 'pow' was not declared in this scope
34 | int h = sqrt(pow((e[i][0] - t[0]), 2) + pow((e[i][1] - t[1]), 2) + pow((e[i][2] - t[2]), 2));
| ^~~
a.cc:34:33: error: 'sqrt' was not declared in this scope
... |
s385661769 | p00176 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string a;
string c[8] = { "black","blue","lime","aqua","red","fuchsia","yellow","white" };
int d[8][3] = { {0,0,0},{0,0,255},{0,255,0},{0,255,255},{255,0,0},
{255,0,255},{255,255,0},{255,255,255} };
while (cin>>a&&a!="0")
{
int t[3];
for (i... | a.cc: In function 'int main()':
a.cc:16:47: error: 'pow' was not declared in this scope
16 | b += (pow(16, (j+1)%2)*(int)(a[i +j] - '0'));
| ^~~
a.cc:18:47: error: 'pow' was not declared in this scope
18 | ... |
s242972142 | p00176 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string a;
string c[8] = { "black","blue","lime","aqua","red","fuchsia","yellow","white" };
int d[8][3] = { {0,0,0},{0,0,255},{0,255,0},{0,255,255},{255,0,0},
{255,0,255},{255,255,0},{255,255,255} };
while (cin>>a&&a!="0")
{
int t[3];
for (i... | a.cc: In function 'int main()':
a.cc:16:47: error: 'pow' was not declared in this scope
16 | b += (pow(16, (j+1)%2)*(int)(a[i +j] - '0'));
| ^~~
a.cc:18:47: error: 'pow' was not declared in this scope
18 | ... |
s308146225 | p00176 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string data;
int f1,f2;
while(1){
getline(cin,data);
if(data[0] == '0') return 0;
f1 = f2 = 0
for(int i = 0; i < 10; i++){
if(data[1] == i)
f1 = 1;
if(data[2] == i)
f2 = 1;
}
if(fa == 1&&f2 == 1){
d... | a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before 'for'
12 | f1 = f2 = 0
| ^
| ;
13 | for(int i = 0; i < 10; i++){
| ~~~
a.cc:13:20: error: 'i' was not declared in this scope
13 | for(int i = 0; i < 10; i++){
... |
s158107823 | p00176 | C++ | #include<iostream>
#include<cstdlib>
#include<cstdio>
#define w 15*16+15
using namespace std;
int fld[8][3]={0,0,0,0,0,w,0,w,
0,0,w,w,w,0,0
,w,0,w,w,w,0,w,w,w};
char* col[]={"black",
"blue","lime","aqua",
"red","fuchsia",
"yellow","white"};
int main(){
int temp,t,x,y,z,a[8],ren;
char s[10];
while(cin>>s,s[0]!='... | a.cc:9:14: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
9 | char* col[]={"black",
| ^~~~~~~
a.cc:10:9: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
10 | "blue","lime","aqua",
| ^~~~~~
a.cc:10:16: ... |
s985374618 | p00176 | C++ | #include <iostream>
#include <iomanip>
#include <algorithm>
using namespace std;
struct Color{
double r,g,b;
};
double sq( double a ){
return a * a;
}
int main(int argc, char const* argv[])
{
const char *color[] = {"black","blue","lime","aqua","red","fuchsia","yellow","white"};
Color colorStrong[] = {{0,0,0},{0... | a.cc: In function 'int main(int, const char**)':
a.cc:32:32: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
32 | d[i] = sqrt( sq( inputColor.r - colorStrong[i].r ) + sq( inputColor.g - colorStrong[i].g ) + sq( inputColor.b - colorStrong[i].b ) );
| ... |
s122648685 | p00176 | C++ | #include <cstdio>
#include <iostream>
#include <cmath>
#include <cstdlib>
using namespace std;
string color[] = {"black", "blue", "lime", "aqua",
"red", "fuchsia", "yellow", "white"};
int nums[][3] = {{0,0,0}, {0,0,255}, {0,255,0}, {0,255,255},
{255,0,0}, {255,0,255}, {255,255,0}, {255,255,255}};
int convert(s... | a.cc:49:8: error: redefinition of 'std::string color []'
49 | string color[] = {"black", "blue", "lime", "aqua",
| ^~~~~
a.cc:6:8: note: 'std::string color [8]' previously declared here
6 | string color[] = {"black", "blue", "lime", "aqua",
| ^~~~~
a.cc:51:5: error: redefinition of 'int... |
s535143950 | p00176 | C++ | #include<string>
#include<cmath>
using namespace std;
#define R 0
#define G 1
#define B 2
void print_col(int r, int g, int b)
{
string col[] = {"black", "blue", "lime", "aqua", "red", "fuchsia", "yellow", "white"};
int c[][3] = {{0, 0, 0}, {0, 0, 255}, {0, 255, 0}, {0, 255, 255},
{255, 0, 0}, {255,... | a.cc: In function 'void print_col(int, int, int)':
a.cc:27:3: error: 'cout' was not declared in this scope
27 | cout << col[a] << endl;
| ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<cmath>
+++ |+#include <io... |
s147784200 | p00176 | C++ | import java.util.Scanner;
import static java.lang.System.out;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
String name[] = {"black","blue","lime","aqua","red","fuchsia","yellow","white"};
int color[][] = {{0,0,0},{0,0,255},{0,255,0},{0,255,255},{255,0,0},{255,... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
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 | import static java.lang.System.out;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '... |
s736043202 | p00177 | C | float a,b,c,d;
float A,B,C,D,E,F;
main(){
for(;scanf("%f%f%f%f",&a,&b,&c,&d),a+1;){
a*=M_PI/180;
b*=M_PI/180;
c*=M_PI/180;
d*=M_PI/180;
A=cos(a)*cos(b);
B=cos(a)*sin(b);
C=sin(a);
D=cos(c)*cos(d);
E=cos(c)*sin(d);
F=sin(c);
printf("%.0f\n",6378.1*acos(A*D+B*E+C*F));
}
exit(0);
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:4:14: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | for(;scanf("%f%f%f%f",&a,&b,&c,&d),a+1;){
| ^~~~~
main.c:1:1: note:... |
s653441479 | p00177 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#define rep(i,l,n) for(lint i=l;i<n;i++)
#define rer(i,l,n) for(lint i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define pb(a) pu... | In file included from /usr/include/c++/14/cmath:47,
from a.cc:9:
a.cc:25:8: error: expected unqualified-id before numeric constant
25 | double M_PI=acos(-1);
| ^~~~
|
s917076813 | p00177 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#define rep(i,l,n) for(lint i=l;i<n;i++)
#define rer(i,l,n) for(lint i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define pb(a) pu... | In file included from /usr/include/c++/14/cmath:47,
from a.cc:9:
a.cc:25:8: error: expected unqualified-id before numeric constant
25 | double M_PI=acos(-1);
| ^~~~
|
s003110762 | p00177 | C++ | #include <bits/stdc++.h>
using namespace std ;
#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
const double r = 6378.1;
double x1,y1,x2,y2;
double c = M_PI/180.0;
while(cin >> y1 >> x1 >> y2 >> x2){... | a.cc: In function 'int main()':
a.cc:17:81: error: expected ')' before ';' token
17 | double d = r * acos(sin(y1) * sin(y2) + cos(y1) * cos(y2) * cos(x1*c - x2*c);
| ~ ^
| ... |
s476547965 | p00177 | C++ | #include<map>
#include<set>
#include<cmath>
#include<cstdio>
#include<cstdio>
#define all(c) (c).begin(),(c).end()
using namespace std;
const double R=6378.10;
const double PI=3.1415926535;
const double EPS=1e-10;
const double toRad=360.0/2.0/PI;
int main(void){
double a,b,c,d;
while(cin >> a >> b >> c >> d){
... | a.cc: In function 'int main()':
a.cc:18:9: error: 'cin' was not declared in this scope
18 | while(cin >> a >> b >> c >> d){
| ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
5 | #include<cstdio>
+++ |+#include <iostream>... |
s973639704 | p00178 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int i,j,k,block[500000][5],hhh,max[5],left,from,time;
int n,d,l,x;
int main(){
while(scanf("%d",&n)*n){
hhh=0;left=0;
for(i=0;i<5;i++)max[i]=0;
for(;n>0;n--){
scanf("%d %d %d",&d,&l,&x); x--;
left+=l;
if(d==1){
k=0;j=0;
for(i=0;i<l;... | main.c: In function 'main':
main.c:39:71: error: lvalue required as left operand of assignment
39 | &block[k-1][j]=&block[k][j];
| ^
|
s752214888 | p00178 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
#define INF 1e9
int field[5000][5],tmp[5000][5];
void down(){
memset(tmp,0,sizeof(tmp));
for(int j = 0 ; j < 5 ; j++){
int p = 4999;
for(int i = 4999 ; i >= 0 ; i--){
if(field[i][j] == -1) continue;
tmp[p--][j] = field[i][j];
... | a.cc: In function 'void down()':
a.cc:11:3: error: 'memset' was not declared in this scope
11 | memset(tmp,0,sizeof(tmp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <algorithm>
+++ |+#include <cstring>
... |
s992768019 | p00178 | C++ | #include <vector>
#include <iostream>
using namespace std;
int n, d, p, q;
int main()
{
cin >> n;
vector<vetcor<bool> > c(5000, vector<int>(5, false));
for(int i = 0; i < n; i++)
{
cin >> d >> p >> q;
if(d == 1)
{
int maxh = -1;
... | a.cc: In function 'int main()':
a.cc:12:12: error: 'vetcor' was not declared in this scope
12 | vector<vetcor<bool> > c(5000, vector<int>(5, false));
| ^~~~~~
a.cc:12:23: error: template argument 1 is invalid
12 | vector<vetcor<bool> > c(5000, vector<int>(5, false));
| ... |
s172380614 | p00178 | C++ | #include <vector>
#include <iostream>
using namespace std;
int n, d, p, q;
int main()
{
cin >> n;
vector<vector<bool> > c(5000, vector<int>(5, false));
for(int i = 0; i < n; i++)
{
cin >> d >> p >> q;
if(d == 1)
{
int maxh = -1;
... | a.cc: In function 'int main()':
a.cc:12:56: error: no matching function for call to 'std::vector<std::vector<bool> >::vector(int, std::vector<int>)'
12 | vector<vector<bool> > c(5000, vector<int>(5, false));
| ^
In file included from /usr/include/c++/1... |
s428880667 | p00178 | C++ | #include<iostream>
#define N 10020
using namespace std;
int main(){
while(true){
int n;
int ans=0;
scanf("%d",&n);
if(n==0)break;
int row[N]={0,};
int h[5]={0,};
for(int i = 0; i < n; ++i){
int mh = 0;
int d,p,q;
scanf("%d%d%d", &d, &p, &q);
--q;
if(d=... | a.cc: In function 'int main()':
a.cc:45:23: error: expected primary-expression before '=' token
45 | if(h[k]<0)=h[k]=0;
| ^
|
s213324014 | p00178 | C++ | #include <iostream>
#include <vector>
using namespace std;
int n;
typedef struct Block
{
int d;
int p;
int q;
} B;
int F[5000][5];
int H[5];
B blocks[1000];
int highest(int r, int l)
{
int max = 0;
for(int i=r; i<l; i++)
{
if(max < H[i])
{
max =H[i];
}
}
return max;
}
void yoko_set(B b)
{
int h... | a.cc: In function 'int main()':
a.cc:118:17: error: 'memset' was not declared in this scope
118 | memset(&F[0][0], 0, sizeof(int)*25000);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <... |
s560976136 | p00178 | C++ | ?1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 #include <iostream> using namespace std; int dir[5010]; void remove(){ int cnt = 0; for(int i = 0 ; i < 5010 ; i++){ if( dir[i] == 31 ) dir[i] = 0,cnt++;... | a.cc:1:2: warning: integer constant is too large for its type
1 | ?1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 #include <iostream> using namespace std; int dir[5010]; void remove(){ int cnt = 0; for(int... |
s145999833 | p00178 | C++ | include <iostream>
#include <math.h>
using namespace std;
int main() {
int i,j,n,a,b,c,d,e,f,g,m[10000];
while(cin >> n) {
if (n==0) break;
for (j=0;j<10000;j++) m[j]=0; d=0;
for (i=0;i<n;i++) {
cin >> a >> b >> c;
f=a >1 ? 1 << (c-1) : ((1 << b)-1) << (c-1);
for (j=d;j>=0;j--) if ( m[j]+f != (m[j... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/cmath:45,
from /usr/include/c++/14/math.h:36,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_nul... |
s361161798 | p00179 | Java | import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
class History {
private int wormHash;
private History p... | Main.java:52: error: class MysteriousWormSolver is public, should be declared in a file named MysteriousWormSolver.java
public class MysteriousWormSolver {
^
1 error
|
s116568829 | p00179 | C++ | #include <cstdio>
#include <string>
#include <utility>
#include <queue>
using namespace std;
typedef pair<int, string> P;
int main()
{
char worm[32];
while (scanf("%s", worm), *worm != '0'){
queue<P> que;
set<string> exist;
for (que.push(P(0, string(worm))); que.size(); que.pop()){
... | a.cc: In function 'int main()':
a.cc:15:9: error: 'set' was not declared in this scope
15 | set<string> exist;
| ^~~
a.cc:5:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
4 | #include <queue>
+++ |+#include <set>
5 | using namespa... |
s069218829 | p00179 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
#include <queue>
using namespace std;
const int MAX= 10000100;
#define loop(i,a,b) for(int i = ... | a.cc: In function 'int bfs(std::string)':
a.cc:50:18: error: 'second' was not declared in this scope
50 | d[p.first] = second;
| ^~~~~~
a.cc:60:1: warning: control reaches end of non-void function [-Wreturn-type]
60 | }
| ^
|
s313798091 | p00179 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<string, int> P;
//????????????????????????????????????
bool judge(string str) {
for (int i = 0; i < str.size(); ++i) {
if (str[0] != str[i]) return false;
}
return true;
}
//??£?????????2?????????????????§?????????????????????
char color(char a, char b... | a.cc: In function 'int solve(std::string)':
a.cc:27:14: error: 'p' was not declared in this scope
27 | if(m[p.first]) continue; //??????????????????
| ^
a.cc:27:24: error: continue statement not within a loop
27 | if(m[p.first]) continue; //??????????????????
... |
s804947900 | p00179 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<string, int> P;
//????????????????????????????????????
bool judge(string str) {
for (int i = 0; i < str.size(); ++i) {
if (str[0] != str[i]) return false;
}
return true;
}
//??£?????????2?????????????????§?????????????????????
char color(char a, char b... | a.cc: In function 'int solve(std::string)':
a.cc:27:14: error: 'p' was not declared in this scope
27 | if(m[p.first]) continue;
| ^
a.cc:27:24: error: continue statement not within a loop
27 | if(m[p.first]) continue;
| ^~~~~~~~
a.cc: In function 'ch... |
s020433006 | p00179 | C++ | #include <list>
#include <stdio.h>
#include <algorithm>
using namespace std;
typedef struct {
char nood[11];
int time;
} WORM;
unsigned int makeHash(char nood[])
{
int i = 0;
unsigned int ret = 0;
while (nood[i] != -1){
ret += nood[i];
ret *= 3;
i++;
}
return (ret);
}
int add_worm(list<WORM>* lstWor... | a.cc: In function 'int add_worm(std::__cxx11::list<WORM>*, std::__cxx11::list<unsigned int>&)':
a.cc:35:25: error: 'memcpy' was not declared in this scope
35 | memcpy(add.nood, lstWorm->front().nood, 11);
| ^~~~~~
a.cc:4:1: note: 'memcpy' is defined in header '<c... |
s790612708 | p00179 | C++ | #include <iostream>
#include <queue>
#include <map>
using namespace std;
int f(char a,char b){
if( a == 'r' && b == 'g' ) return 'b';
if( a == 'b' && b == 'r' ) return 'g';
if( a == 'b' && b == 'g' ) return 'r';
swap(a,b);
if( a == 'r' && b == 'g' ) return 'b';
if( a == 'b' && b == 'r' ) return 'g';
if( a == 'b... | a.cc: In function 'int main()':
a.cc:26:29: error: 'count' was not declared in this scope
26 | if( count(q.first.begin(),q.first.end(),q.first[0]) == q.first.size() ) {
| ^~~~~
|
s584238461 | p00179 | C++ | #include <cstdio>
#include <queue>
#include <map>
using namespace std;
int main()
{
char str[256];
char col[3] = "rgb";
while (scanf("%s", str) && str[0] !='0'){
map<string, int> minTime;
queue<string> q;
string s = str;
minTime[s] = 0;
bool ng = true;
for (q.push(s); !q.empty(); q.pop()){
s... | a.cc: In function 'int main()':
a.cc:10:23: error: initializer-string for 'char [3]' is too long [-fpermissive]
10 | char col[3] = "rgb";
| ^~~~~
a.cc:13:21: error: 'string' was not declared in this scope
13 | map<string, int> minTime;
| ... |
s298957495 | p00179 | C++ | import java.util.*;
public class Main{
static Scanner kbd = new Scanner(System.in);
public static void main(String[] args){
while(kbd.hasNext()){
String s = kbd.nextLine();
if(!s.equals("0")) solve(s);
}
}
static void solve(String s){
//String[] pattern = new String[60000];
HashSet<String... | 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:2:1: error: expected unqualified-id before 'public'
2 | public class Main{
| ^~~~~~
a.cc:91:5: error: 'Object' does not name a type
91 | Objec... |
s229539645 | p00179 | C++ | #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <set>
#include <climits>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).be... | a.cc: In function 'int main()':
a.cc:86:44: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment
86 | qf=qu.front();
| ... |
s834821648 | p00180 | C | #include<stdio.h>
#include<stdlib.h>
#define INF 10000000
int cost[100][500];
int mincost[500];
int used[500];
int main(void)
{
int n, m,a,b,c;
int i,j;
while (1) {
scanf("%d %d", &n, &m);
if (n == 0 && m == 0)break;
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) {
if (i == j)cost[i][j] = 0;
el... | main.c: In function 'main':
main.c:47:46: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
47 | mincost[u] = min(mincost[u], cost[v][u]);
| ^~~
| ... |
s365116730 | p00180 | C++ | #include <iostream>
#include <utility>
using namespace std;
int n,m,sum;
int P[110],a[10010],b[10010],cost[10010];
pair<int,int> bridge[10010];
void init(int N) {
for(int i=0; i<N; ++i) P[i] = i;
}
int root(int a) {
if(P[a] == a) return a;
return (P[a] = root(P[a]));
}
int main() {
cin >> n >> m;
while(n!=0 && m... | a.cc: In function 'int main()':
a.cc:24:17: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(bridge,bridge+m);
| ^~~~
| short
|
s922033857 | p00180 | C++ | # include <iostream>
# include <algorithm>
const int MAX_N = 100;
const int INF = 100000;
int n, m;
int cost[MAX_N][MAX_N], mincost[MAX_N];
bool used[MAX_N];
int prim(){
for (int i = 0; i < n; ++i)
mincost[i] = INF;
mincost[0] = 0;
int res = 0;
while (1){
int v = -1;
for (int i = 0; i < n; ++i){
if (!us... | a.cc: In function 'int main()':
a.cc:39:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
39 | std::memset(used, 0, n);
| ^~~~~~
| wmemset
|
s601492842 | p00180 | C++ | # include <iostream>
# include <algorithm>
const int MAX_N = 100;
const int INF = 100000;
int n, m;
int cost[MAX_N][MAX_N], mincost[MAX_N];
bool used[MAX_N];
int prim(){
for (int i = 0; i < n; ++i)
mincost[i] = INF;
mincost[0] = 0;
int res = 0;
while (1){
int v = -1;
for (int i = 0; i < n; ++i){
if (!us... | a.cc: In function 'int main()':
a.cc:39:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
39 | std::memset(used, 0, n);
| ^~~~~~
| wmemset
|
s024287865 | p00180 | C++ | # include <iostream>
# include <algorithm>
const int MAX_N = 100;
const int INF = 100000;
int n, m;
int cost[MAX_N][MAX_N], mincost[MAX_N];
bool used[MAX_N];
int prim(){
for (int i = 0; i < n; ++i)
mincost[i] = INF;
mincost[0] = 0;
int res = 0;
while (1){
int v = -1;
for (int i = 0; i < n; ++i){
if (!us... | a.cc: In function 'int main()':
a.cc:39:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
39 | std::memset(used, 0, n);
| ^~~~~~
| wmemset
|
s642244162 | p00180 | C++ | #include <iostream>
#include <set>
#include <algorithm>
using namespace std;
int n, m;
vector< set< pair<int, int> > > cost(100,set< pair<int,int> >());
int prim()
{
int res=0;
set<int> v;
v.insert(0);
while(v.size()<n)
{
pair<int, int> mini(100000007, -1);
for(set<int>::iterator it=v.begin();it!=v.end();it... | a.cc:8:1: error: 'vector' does not name a type
8 | vector< set< pair<int, int> > > cost(100,set< pair<int,int> >());
| ^~~~~~
a.cc: In function 'int prim()':
a.cc:20:66: error: 'cost' was not declared in this scope; did you mean 'const'?
20 | for(set< pair<int, int> >::iterator it2... |
s405066973 | p00180 | C++ | #include <list>
#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
long long prim(int V, vector<pair<int, long long> > X[]) {
priority_queue<pair<long long, int>, vector<pair<long long, int> >, greater<pair<long long, int> > > Q;
for (int i = 0; i < ... | a.cc: In function 'long long int prim(int, std::vector<std::pair<int, long long int> >*)':
a.cc:10:37: error: 'dist' was not declared in this scope
10 | for (int i = 0; i < V; i++) dist[i] = INF, used[i] = false;
| ^~~~
a.cc:10:47: error: 'INF' was not declared in th... |
s093611573 | p00180 | C++ | #include <list>
#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
bool used[100]; long long dist[100];
long long prim(int V, vector<pair<int, long long> > X[]) {
priority_queue<pair<long long, int>, vector<pair<long long, int> >, greater<pair<long lo... | a.cc: In function 'long long int prim(int, std::vector<std::pair<int, long long int> >*)':
a.cc:11:47: error: 'INF' was not declared in this scope
11 | for (int i = 0; i < V; i++) dist[i] = INF, used[i] = false;
| ^~~
|
s496734165 | p00180 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<string>
#include<cmath>
#include<set>
#include<stack>
using namespace std;
typedef unsigned long long ll;
int main(){
int n,m;
while(cin>>n>>m,n){
int ci... | a.cc: In function 'int main()':
a.cc:23:28: error: 'INT_MAX' was not declared in this scope
23 | city[i][j]=INT_MAX;
| ^~~~~~~
a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
12 | #include<stack>
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.