submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s829160930 | p00075 | C++ | #include<stdio.h>
int main(){
int l;
double m,n;
while(sscanf("%d,%lf,%lf",&l,&m,&n)){
if(25.0<=m/(n*n))printf("%d\n",l);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:35: error: cannot convert 'int*' to 'const char*'
6 | while(sscanf("%d,%lf,%lf",&l,&m,&n)){
| ^~
| |
| int*
In file included from a.cc:1:
/usr/includ... |
s601555668 | p00075 | C++ | #include<stdio.h>
int main(){
float a,b,c;
printf("????¢¨??????????????????????????\???????????????:");
while(1){
scanf("%f",&a);
if(a<85){
printf("????????????\n??????????????\?????????:");
}
else{
printf("?????????????????§?????????(^??^)9m??????????????¬??°\n");
break;
}
}
printf("???????????... | a.cc:11:58: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
11 | printf("?????????????????§?????????(^??^)9m??????????????¬??°\n");
a.cc:15:42: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
15 | printf("???????????\???????????????(m):")... |
s640264845 | p00075 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int id;
double w;
double h;
while(cin>>id){
scanf("%f",&w);
scanf("%f",&h)
double bmi = w/(h*h);
if(bmi >= 25.0){
cout<<id<<endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:23: error: expected ';' before 'double'
12 | scanf("%f",&h)
| ^
| ;
13 | double bmi = w/(h*h);
| ~~~~~~
a.cc:14:12: error: 'bmi' was not declared in this scope
14 | if(... |
s302133099 | p00075 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int id;
double w, h;
while (scanf_s("%d,%lf,%lf",&id,&w,&h)) {
double bmi = w / (h*h);
if (bmi >= 25.0) {
cout << id << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
9 | while (scanf_s("%d,%lf,%lf",&id,&w,&h)) {
| ^~~~~~~
| scanf
|
s818489749 | p00075 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int id;
double w, h;
while (scanf_s("%d,%lf,%lf",&id,&w,&h) != EOF) {
double bmi = w / (h*h);
if (bmi >= 25.0) {
cout << id << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
9 | while (scanf_s("%d,%lf,%lf",&id,&w,&h) != EOF) {
| ^~~~~~~
| scanf
|
s552259702 | p00075 | C++ | #include <iostream>
#include <string>
#include <cmath>
using namespace std;
int num;
double w, h, BMI;
char cnm;
double BMIk(double w, double h){
double ans = w / pow(h, 2);
return ans;
}
int main(){
while(cin >> num >> cnm >> w >> cnm >> h){
BMI = BMIk(w, h);
if(BMI >= 25){
cout << num < endl;
}
}
ret... | a.cc: In function 'int main()':
a.cc:19:37: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
19 | cout << num < endl;
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/string:4... |
s119829988 | p00075 | C++ | #include <iostream>
#include <string>
#include <cmath>
using namespace std;
int num;
double w, h, BMI;
char cnm;
double BMIk(double w, double h){
double ans = w / pow(h, 2);
return ans;
}
int main(){
while(cin >> num >> cnm >> w >> cnm >> h){
BMI = BMIk(w, h);
if(BMI >= 25){
cout << num < endl;
}
}
ret... | a.cc: In function 'int main()':
a.cc:19:37: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
19 | cout << num < endl;
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/string:4... |
s300139887 | p00075 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main()
{
int s[50] = {};
double w[50] = {};
double h[50] = {};
int i = 0;
vector <int> sb = {};
while (scanf_s("%d,%f,%f", s[i], w[i], h[i])) {
if ((w[i] / (h[i] ^ 2)) >= 25) {
sb.push_back(s[i]);
}
i++;
}
int j = 0;
while (sb[j] == 0) {
c... | a.cc: In function 'int main()':
a.cc:11:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
11 | while (scanf_s("%d,%f,%f", s[i], w[i], h[i])) {
| ^~~~~~~
| scanf
a.cc:12:35: error: invalid operands of types 'double' and 'int' to binary 'operat... |
s676344417 | p00075 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main()
{
int s[50] = {};
double w[50] = {};
double h[50] = {};
int i = 0;
vector <int> sb(50, 0);
while (scanf_s("%d,%f,%f", &s[i], &w[i], &h[i]) != EOF) {
if ((w[i] / (h[i] * h[i])) >= 25) {
sb.push_back(s[i]);
}
i++;
}
int j = 0;
while (sb... | a.cc: In function 'int main()':
a.cc:11:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
11 | while (scanf_s("%d,%f,%f", &s[i], &w[i], &h[i]) != EOF) {
| ^~~~~~~
| scanf
|
s499300900 | p00075 | C++ | #include<iostream>
#include<stdio.h>
#include<vector>
using namespace std;
int main()
{
int s[50] = {};
double w[50] = {};
double h[50] = {};
int i = 0;
vector <int> sb(50, 0);
while (scanf_s("%d,%f,%f", &s[i], &w[i], &h[i]) != EOF) {
if ((w[i] / (h[i] * h[i])) >= 25) {
sb.push_back(s[i]);
}
i++;
}
int... | a.cc: In function 'int main()':
a.cc:12:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
12 | while (scanf_s("%d,%f,%f", &s[i], &w[i], &h[i]) != EOF) {
| ^~~~~~~
| scanf
|
s623503849 | p00075 | C++ | int main()
{
int s;
double w, h;
while (scanf("%d,%lf,%lf", &s, &w, &h) != EOF) {
double bmi = w / (h * h);
if (bmi > 25.0) {
printf("%d\n", s);
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:16: error: 'scanf' was not declared in this scope
6 | while (scanf("%d,%lf,%lf", &s, &w, &h) != EOF) {
| ^~~~~
a.cc:6:51: error: 'EOF' was not declared in this scope
6 | while (scanf("%d,%lf,%lf", &s, &w, &h) != EOF) {
| ... |
s792020059 | p00075 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
double a,b,c;
scanf("%f,%f,%f",&a,&b,&c);
if((b)/(c*c)>=25)
cout<<s<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:13: error: 's' was not declared in this scope
11 | cout<<s<<endl;
| ^
|
s270096432 | p00075 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int s;
double w,h;
while(cin>>s>>w>>h){
if(w/h/h>=25)cout<<w<<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:39: error: expected primary-expression before '<' token
8 | if(w/h/h>=25)cout<<w<<<endl;
| ^
|
s972108367 | p00075 | C++ | include <iostream>
using namespace std;
int main()
{
int s;
double w, h, BMI;
while(scanf("%lf %lf %lf", s, w, h) != EOF) {
BMI = w / h / h;
if (BMI >= 25)
cout << s << endl;
}
return 0;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:11: error: 'scanf' was not declared in this scope
7 | while(scanf("%lf %lf %lf", s, w, h) != EOF) {
| ^~~~~
a.cc:7:44: error: 'EOF' was not declared in this scope
... |
s659527015 | p00075 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> split(string s, char delim = ',');
void dataInput(vector<vector<string>> &data);
double calcBMI(double w, double h);
void showFat(vector<vector<string>> data);
int main() {
vector<vector<string>> data;
dataInput(data);
... | a.cc: In function 'void dataInput(std::vector<std::vector<std::__cxx11::basic_string<char> > >&)':
a.cc:36:13: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::__cxx11::basic_string<char> > >, std::vector<std::__cxx11::basic_string<char> > >::value_type' {aka 'class std::vector<std::__cxx11::basic_stri... |
s940423881 | p00075 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> split(string s, char delim = ',');
void dataInput(vector<vector<string> > &data);
double calcBMI(double w, double h);
void showFat(vector<vector<string> > data);
int main() {
vector<vector<string> > data;
dataInput(data)... | a.cc: In function 'void dataInput(std::vector<std::vector<std::__cxx11::basic_string<char> > >&)':
a.cc:36:13: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::__cxx11::basic_string<char> > >, std::vector<std::__cxx11::basic_string<char> > >::value_type' {aka 'class std::vector<std::__cxx11::basic_stri... |
s700949875 | p00075 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> split(string s, char delim = ',');
void dataInput(vector<vector<string> > &data);
double calcBMI(double w, double h);
void showFat(vector<vector<string> > data);
int main() {
vector<vector<string> > data;
dataInput(data)... | a.cc: In function 'void dataInput(std::vector<std::vector<std::__cxx11::basic_string<char> > >&)':
a.cc:36:22: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::push_back(std::vector<std::__cxx11::basic_string<char> >)'
36 | data[i].push_back(split(temp));
| ~~~~~... |
s698368277 | p00075 | C++ | main(id){double w,h,bmi;for(;~scanf("%d,%lf,%lf",&id,&w,&h);)w/h/h>=25&&printf("%d\n",id);exit(0);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(id){double w,h,bmi;for(;~scanf("%d,%lf,%lf",&id,&w,&h);)w/h/h>=25&&printf("%d\n",id);exit(0);}
| ^
|
s881147665 | p00075 | C++ | float w,h;main(n,a){for(;~scanf("%[^,],%f,%f ",a,&w,&h);)w<24*h*h||puts(a);} | a.cc:1:15: error: expected constructor, destructor, or type conversion before '(' token
1 | float w,h;main(n,a){for(;~scanf("%[^,],%f,%f ",a,&w,&h);)w<24*h*h||puts(a);}
| ^
|
s452878858 | p00075 | C++ | #include <cstdio>
int main(){
int i;
double w,t;
while( ~scanf("%d,%lf,%lf", &i , &w , &t ) ){
if( w/t/t >= 25.0 )
printf("%d\n", No );
}
} | a.cc: In function 'int main()':
a.cc:8:40: error: 'No' was not declared in this scope
8 | printf("%d\n", No );
| ^~
|
s286455931 | p00075 | C++ | main(n){double w,t;for(;~scanf("%d,%lf,%lf",&n,&w,&t);w/t/t>25.0?printf("%d\n", n ):0);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n){double w,t;for(;~scanf("%d,%lf,%lf",&n,&w,&t);w/t/t>25.0?printf("%d\n", n ):0);}
| ^
|
s921166046 | p00075 | C++ | main(n){double w,t;for(;~scanf("%d,%f,%f",&n,&w,&t);w/t/t>=25?printf("%d\n",n):0);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n){double w,t;for(;~scanf("%d,%f,%f",&n,&w,&t);w/t/t>=25?printf("%d\n",n):0);}
| ^
|
s178708819 | p00075 | C++ | #include <cstdio>
#include <vector>
using namespace std;
const double BMI_FAT = 25.0;
int main(int argc, char *argv[]) {
vector<int> fat_list;
int id;
float mass, height;
while (EOF != fscanf(stdin, "%d,%f,%f", &id, &mass, &height)) {
float bmi = mass / (height * height);
if (BMI_FAT =< bmi) {
fat_list.pu... | a.cc: In function 'int main(int, char**)':
a.cc:13:30: error: expected primary-expression before '<' token
13 | if (BMI_FAT =< bmi) {
| ^
|
s459181688 | p00075 | C++ | float h,w,k;main(i){for(;~scanf("%d%c%f%c%f",&i,&k,&w,&k,&h);25*h*h>w?:printf("%d\n",i));} | a.cc:1:17: error: expected constructor, destructor, or type conversion before '(' token
1 | float h,w,k;main(i){for(;~scanf("%d%c%f%c%f",&i,&k,&w,&k,&h);25*h*h>w?:printf("%d\n",i));}
| ^
|
s451622527 | p00075 | C++ | #include <iostream>
using namespace std;
int num,i=0;
double m,kg;
int main(void){
while(~scanf("%d,%lf,%lf",&num,&kg,&m)){
if(kg/(pow(m,2))>=25)printf("%d\n",num);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:24: error: 'pow' was not declared in this scope
9 | if(kg/(pow(m,2))>=25)printf("%d\n",num);
| ^~~
|
s176873109 | p00075 | C++ | main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){double y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){int x,sum=0;double a,b;while(scanf("%d,%lf,%lf",&x,&a,&b)!=EOF){double y=a/b;y/=b;if(y>=25)printf("%d\n",x);}return 0;}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:37: error: 'scanf' was not declared in this sco... |
s191571793 | p00075 | C++ | include<iostream>
#include<cstdio>
using namespace std;
int main(){
double x,y;
int n;
while(scanf("%d,%lf,%lf",&n,&x,&y) != EOF){
if(x/(y*y) >= 25) cout << n << endl;
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:12:23: error: 'cout' was not declared in this scope
12 | if(x/(y*y) >= 25) cout << n << endl;
| ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostre... |
s863316469 | p00075 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> ans;
int a;
double b,c;
while(scanf("%d,%f,%f",a,b,c)){
if(c/(b*b) >= 25) ans.push_back(a)
}
for(int i=0; i<ans.size(); i++){
cout<<ans[i]<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:51: error: expected ';' before '}' token
12 | if(c/(b*b) >= 25) ans.push_back(a)
| ^
| ;
13 | }
| ~ ... |
s277899354 | p00075 | C++ | #include<iostream>
using namespace std;
int man(){
int np;
double w,h;
while(cin>>np>>w>>h) if(w/(h*h)>=25) cout << np << endl;
return 0;
} | /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
|
s270612486 | p00076 | Java | import java.util.Scanner;
//Treasure Hunt II
public class AOJ0076 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
int n = sc.nextInt();
if(n==-1)break;
double x = 1;
double y = 0;
for(int i=2;i<=n;i++){
double d = Math.sqrt(x*x+y*y);
double dx =... | Main.java:4: error: class AOJ0076 is public, should be declared in a file named AOJ0076.java
public class AOJ0076 {
^
1 error
|
s162213607 | p00076 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RA... | a.cc:54:2: error: stray '#' in program
54 | }#include <bits/stdc++.h>
| ^
a.cc:54:3: error: 'include' does not name a type
54 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:85:21: error: redefinition of 'const double EPS'
85 | static const double EPS = 1e-10;
| ^~~
a.cc:32:... |
s518165634 | p00076 | C++ | def f(x,y):
d=(x*x+y*y)**0.5
return -y/d,x/d
while True:
n=input()
if n==-1:
break
x,y=1.0,0
for i in xrange(n-1):
dx,dy=f(x,y)
x,y=x+dx,y+dy
print x,y | a.cc:1:1: error: 'def' does not name a type
1 | def f(x,y):
| ^~~
|
s196392121 | p00076 | C++ | #include <iomanip>
#include <iostream>
#define VARIABLE(x) cerr << #x << "=" << x << endl
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
const int INF = 10000000;
using namespace std;
typedef long long ll;
/** Problem0076 : Treasure Hunt II **/
int main()
{
int n;
whi... | a.cc: In function 'int main()':
a.cc:22:40: error: 'sqrt' was not declared in this scope
22 | double dx = nx/sqrt(nx*nx+ny*ny);
| ^~~~
|
s484059533 | p00077 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class V0077{
public static void main (String[] args) throws java.lang.Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String str = br.readLine();
for(int i = 0;i<str.length();i++){
... | Main.java:5: error: class V0077 is public, should be declared in a file named V0077.java
public class V0077{
^
1 error
|
s290888690 | p00077 | Java | mport java.util.Scanner;
//Run Length
public class AOJ0077 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
char[] s = sc.next().toCharArray();
StringBuilder sb = new StringBuilder();
int i = 0;
while(i<s.length){
if(s[i]=='@'){
int x = s[+... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s418017200 | p00077 | Java | mport java.util.Scanner;
//Run Length
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
char[] s = sc.next().toCharArray();
StringBuilder sb = new StringBuilder();
int i = 0;
while(i<s.length){
if(s[i]=='@'){
int x = s[++i]... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s529527951 | p00077 | Java | package jp.ac.can;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class RLE{
public static void main(String[] args) throws IOException{
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
String line = read.readLine();
Str... | Main.java:6: error: class RLE is public, should be declared in a file named RLE.java
public class RLE{
^
1 error
|
s690274191 | p00077 | C | #include <stdio.h>
#include <string.h>
int i,j,k,l;
char nyuroku[114514],m;
int main(int argc,char **argv){
while( scanf("%s",&nyuroku[0]) != EOF )
{
printf("debug = %s\n",nyuuroku);
l = strlen(nyuroku);
for(i=0;i<l;i++)
{
if( nyuroku[i] != '@' )
{
printf("%c",nyuroku[i]);
... | main.c: In function 'main':
main.c:10:29: error: 'nyuuroku' undeclared (first use in this function); did you mean 'nyuroku'?
10 | printf("debug = %s\n",nyuuroku);
| ^~~~~~~~
| nyuroku
main.c:10:29: note: each undeclared identifier is reported ... |
s668818098 | p00077 | C | #include <stdio.h>
#include <string.h>
#define LENGTH 1000
int ctoi(char input)
{
int i;
i = input - '0';
return i;
}
int main()
{
char st[LENGTH] = {};
char output_st[LENGTH] = {};
int i = 0, j = 0, k = 0;
for( k = 0 ; k < 50 ; k++ )
{
if( (scanf("%s", st)) != EOF )
{
i = 0;
whil... | main.c: In function 'main':
main.c:44:3: error: 'r' undeclared (first use in this function)
44 | r
| ^
main.c:44:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:44:4: error: expected ';' before '}' token
44 | r
| ^
| ;
45 | }
... |
s339213587 | p00077 | C | main(i,j){
char s[256];
for(;gets(s);){
for(i=0;s[i];i++){
if(s[i]=='@'){
for(j=0;j<s[i+1]-'0';j++)putchar(s[i+2]);
i++;
}
else putchar(s[i]);
}
puts("");
}
exit(0);
} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(i,j){
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:3:14: error: implicit declaration of function 'gets' [-... |
s641299609 | p00077 | C | include<stdio.h>
#include<string.h>
main(){
char c[102];
int i,j,len,s,s2;
while(scanf("%s",c)!=EOF){
len=strlen(c);
for(i=0;i<len;i++){
if(c[i]=='@'){
s=c[i+1]-'0';
for(j=0;j<s;j++){
printf("%c",c[i+2]);
}
i+=2;
}
else{
printf("%c",c[i]);
}
}
printf("\n");
}
re... | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
In file included from main.c:2:
/usr/include/string.h:44:22: error: unknown type name 'size_t'
44 | size_t __n) __THROW __nonnull ((1, 2));
| ... |
s719343941 | p00077 | C | #include <stdio.h>#include <stdlib.h> int main(void){ int i,j,k; char word[100],output[1000],loopWord[2],tmpWord; int loop; while(scanf("%s",word)!=EOF) { i=0; j=0; while(word[i]!='0') { //@があったら if(word[i]=='@') { //次の文字を見て... | main.c:1:19: warning: extra tokens at end of #include directive
1 | #include <stdio.h>#include <stdlib.h> int main(void){ int i,j,k; char word[100],output[1000],loopWord[2],tmpWord; int loop; while(scanf("%s",word)!=EOF) { i=0; j=0; while(word[i]!='0') { //... |
s014427281 | p00077 | C++ | #include<iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main() {
string s1;
cin >> s1;
for (int i=0;i<s1.size();++i) {
char c = s[i];
int d = s[i+1];
char e = s[i+2];
if (c == @) {
s1.erase(s1.begin() + i);
string s2;
f... | a.cc:13:18: error: stray '@' in program
13 | if (c == @) {
| ^
a.cc: In function 'int main()':
a.cc:10:18: error: 's' was not declared in this scope
10 | char c = s[i];
| ^
a.cc:13:19: error: expected primary-expression before ')' token
13 | ... |
s153521335 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
for (int i=0;i<s1.size();++i) {
char c = s[i];
if (c == @) {
int d = s[i+1];
char e = s[i+2];
s1.erase(s1.begin() + i);
string s2;
for (int t=0;... | a.cc:10:18: error: stray '@' in program
10 | if (c == @) {
| ^
a.cc: In function 'int main()':
a.cc:9:18: error: 's' was not declared in this scope
9 | char c = s[i];
| ^
a.cc:10:19: error: expected primary-expression before ')' token
10 | ... |
s263179282 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
for (int i=0;i<s1.size();++i) {
char c = s[i];
if (c == @) {
int d = s[i+1];
char e = s[i+2];
s1.erase(s1.begin() + i);
string s2;
for (int t=0;... | a.cc:10:18: error: stray '@' in program
10 | if (c == @) {
| ^
a.cc: In function 'int main()':
a.cc:9:18: error: 's' was not declared in this scope
9 | char c = s[i];
| ^
a.cc:10:19: error: expected primary-expression before ')' token
10 | ... |
s952014266 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
for (int i=0;i<s1.size();++i) {
char c = s1[i];
if (c == @) {
int d = s1[i+1];
char e = s1[i+2];
s1.erase(s1.begin() + i);
string s2;
for (int t... | a.cc:10:18: error: stray '@' in program
10 | if (c == @) {
| ^
a.cc: In function 'int main()':
a.cc:10:19: error: expected primary-expression before ')' token
10 | if (c == @) {
| ^
a.cc:16:25: error: no matching function for call to 'std::__cxx11::ba... |
s952282604 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
for (int i=0;i<s1.size();++i) {
char c = s1[i];
string s2;
if (c == @) {
int d = s1[i+1];
char e = s1[i+2];
for (int t=0;t<d;++t){
s2.insert(s2.end... | a.cc:11:18: error: stray '@' in program
11 | if (c == @) {
| ^
a.cc: In function 'int main()':
a.cc:11:19: error: expected primary-expression before ')' token
11 | if (c == @) {
| ^
a.cc:17:9: error: expected '}' before 'else'
17 | else{
... |
s645587602 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
string s2;
for (int i=0;i<s1.size();++i) {
char c = s1[i];
if (c == @) {
int d = s1[i+1];
char e = s1[i+2];
for (int t=0;t<d;++t){
s2.insert(s2.end(), ... | a.cc:11:18: error: stray '@' in program
11 | if (c == @) {
| ^
a.cc: In function 'int main()':
a.cc:11:19: error: expected primary-expression before ')' token
11 | if (c == @) {
| ^
a.cc:17:9: error: expected '}' before 'else'
17 | else{
... |
s679061376 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
string s2;
for (int i=0;i<s1.size();++i) {
char c = s1[i];
if (c == @){
int d = s1[i+1];
char e = s1[i+2];
for (int t=0;t<d;++t){
s2.insert(s2.end(), e... | a.cc:11:18: error: stray '@' in program
11 | if (c == @){
| ^
a.cc: In function 'int main()':
a.cc:11:19: error: expected primary-expression before ')' token
11 | if (c == @){
| ^
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.c... |
s568856788 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
string s2;
for (int i=0;i<s1.size();++i) {
char c = s1[i];
if (c == @){
int d = s1[i+1];
char e = s1[i+2];
for (int t=0;t<d;++t){
s2.insert(s2.end(), e... | a.cc:11:18: error: stray '@' in program
11 | if (c == @){
| ^
a.cc: In function 'int main()':
a.cc:11:19: error: expected primary-expression before ')' token
11 | if (c == @){
| ^
|
s519731246 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
string s2;
for (int i=0;i<s1.size();++i) {
char c = s1[i];
if (c == "@"){
int d = s1[i+1];
char e = s1[i+2];
for (int t=0;t<d;++t){
s2.insert(s2.end(),... | a.cc: In function 'int main()':
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if (c == "@"){
| ~~^~~~~~
|
s161282441 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
string s1;
cin >> s1;
string s2;
for (int i=0;i<s1.size();++i) {
char c = s1[i];
if (c == "@"){
int d = s1[i+1];
char e = s1[i+2];
for (int t=0;t<d;++t){
s2.insert(s2.end(),... | a.cc: In function 'int main()':
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if (c == "@"){
| ~~^~~~~~
|
s499542860 | p00077 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
while(cin >> s){
while(s.find("@")!=-1){
int x=s.find("@");
string buf;
for(int i=0;i<s[x+1]-"0";i++) buf+=s[x+2];
s.replace(x,3,buf);
}
cout << s << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:27: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator-'
10 | for(int i=0;i<s[x+1]-"0";i++) buf+=s[x+2];
|
s178767564 | p00077 | C++ | #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 101
#define _MAX 81
int main(void)
{
char str[MAX], ans[MAX * 9];
while (gets_s(str, MAX) != NULL) {
for (int i = 0, j = 0; str[i - 1] != '\0'; ++i) {
if (str[i]... | a.cc: In function 'int main()':
a.cc:13:16: error: 'gets_s' was not declared in this scope
13 | while (gets_s(str, MAX) != NULL) {
| ^~~~~~
|
s704524421 | p00077 | C++ | #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 101
#define _MAX 81
int main(void)
{
char str[MAX];
while (gets_s(str, MAX) != NULL) {
for (int i = 0; str[i - 1] != '\0'; ++i) {
if (str[i] == '@') {
for (i... | a.cc: In function 'int main()':
a.cc:13:16: error: 'gets_s' was not declared in this scope
13 | while (gets_s(str, MAX) != NULL) {
| ^~~~~~
|
s236771594 | p00077 | C++ | //#define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 101
#define _MAX 81
int main(void)
{
char str[MAX];
while (gets_s(str, MAX) != NULL) {
for (int i = 0; str[i - 1] != '\0'; ++i) {
if (str[i] == '@') {
for ... | a.cc: In function 'int main()':
a.cc:13:16: error: 'gets_s' was not declared in this scope
13 | while (gets_s(str, MAX) != NULL) {
| ^~~~~~
|
s724064827 | p00077 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
while (cin >> s){
for (auto& it = s.begin(); it != s.end(); it++){
if (*it != '@'){
cout << *it;
continue;
}
it++;
int n = (*it) - '0';
it++;
for (int i = 0; i < n; i++){
cout << *it;
}
}
cout <<... | a.cc: In function 'int main()':
a.cc:10:40: error: cannot bind non-const lvalue reference of type '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&' to an rvalue of type 'std::__cxx11::basic_string<char>::iterator'
10 | for (auto& it = s.begin(); it != s.end(); it++){
| ... |
s490238672 | p00077 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s;
while (cin >> s){
for (auto& it = s.begin(); it != s.end(); it++){
if (*it != '@'){
cout << *it;
continue;
}
it++;
int n = (*it) - '0';
it++;
for (int i = 0; i < n; i++){
cout << *it;
}
}
cout <<... | a.cc: In function 'int main()':
a.cc:10:40: error: cannot bind non-const lvalue reference of type '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&' to an rvalue of type 'std::__cxx11::basic_string<char>::iterator'
10 | for (auto& it = s.begin(); it != s.end(); it++){
| ... |
s024123346 | p00077 | C++ | #include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main()
{
int i, j, n;
char c[100], b, d;
string s;
while (cin >> c)
{
if (cin.eof()) break;
s = "";
for (i = 0; i < strlen(c);)
{
if (c[i] == '@')
{
d = c[++i];
n = atoi(&d);
b = c[++i];
for (j = 0; j < n... | a.cc: In function 'int main()':
a.cc:14:33: error: 'strlen' was not declared in this scope
14 | for (i = 0; i < strlen(c);)
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #includ... |
s991701820 | p00077 | C++ | #include <iostream>
#include <string>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
int i, j, n;
char c[100], b, d;
string s;
while (cin >> c)
{
if (cin.eof()) break;
s = "";
for (i = 0; i < strlen(c);)
{
if (c[i] == '@')
{
d = c[++i];
n = atoi(&d);
b = c[++i];
... | a.cc: In function 'int main()':
a.cc:15:33: error: 'strlen' was not declared in this scope
15 | for (i = 0; i < strlen(c);)
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #includ... |
s064072961 | p00077 | C++ | #include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int n, i, j, c;
char s[101] = "", r[101] = "", t;
while (cin >> s, !cin.eof())
{
c = 0;
for (i = 0; i < strlen(s); i++)
{
if (s[i] == '@')
{
t = s[i+1];
n = atoi(&t);
for (j = 0; j < n; j++)
{
r[c] = s[i+2];
... | a.cc: In function 'int main()':
a.cc:11:33: error: 'strlen' was not declared in this scope
11 | for (i = 0; i < strlen(s); i++)
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #in... |
s092916333 | p00077 | C++ | include <string>
#include <cstdio>
#include <iostream>
using namespace std;
int main(){
string s;
while(cin>>s){
for(int i=0; i<s.size(); i++){
if(s[i]!='@') putchar(s[i]);
else {
i++;
int n=s[i]-'0';
i++;
for(int j=0; j<n; j++){
putchar(s[i]);
}
}
}
putchar('\n');
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <string>
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
fr... |
s625223860 | p00078 | Java | #include <stdio.h>
#include <stdlib.h>
#define sqr(x) ((x)*(x))
int main(void) {
int n,x,y,i,j;
int **magic;
while (1) {
scanf("%d",&n);
if (n==0) break;
magic = (int **)calloc(n,sizeof(int *));
for (i=0;i<n;i++) magic[i] = (int *)calloc(n,sizeof(int));
x = n/2;
y = n/2+1;
for (i=1;i<=sqr(n);i++) {
... | Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
^
Main.java:2: error: illegal character: '#'
#include <stdlib.h>
^
Main.java:3: error: illegal character: '#'
#define sqr(x) ((x)*(x))
^
Main.java:7: error: class, i... |
s656871256 | p00078 | Java | import java.util.Scanner;
public class Main {
static int cnt;
static int x, y;
static int[][] a;
static int n;
static void pushNumber(){
// 2. 次の数字を右斜め下のマス目に...
x++;
y++;
/* 2-1. 右にはみ出した場合には、同じ行の左はしに、
* 左にはみ出した場合には、同じ行の右はしに、
* 下にはみ出した場合には、同じ列の一番上に... */
if(x>=n){
x=... | Main.java:1: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:1: error: illegal character: '#'
import java.util.Scanner;
^
Main.java:1: error: class, interface, enum, or record expected
import java.util.Scanner;
^
3 errors
|
s627633498 | p00078 | Java | import java.util.Scanner;
public class Main {
static int cnt;
static int x, y;
static int[][] a;
static int n;
static void pushNumber(){
// 2. 次の数字を右斜め下のマス目に...
x++;
y++;
/* 2-1. 右にはみ出した場合には、同じ行の左はしに、
* 左にはみ出した場合には、同じ行の右はしに、
* 下にはみ出した場合には、同じ列の一番上に... */
if(x>=n){
x=... | Main.java:1: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:1: error: illegal character: '#'
import java.util.Scanner;
^
Main.java:1: error: class, interface, enum, or record expected
import java.util.Scanner;
^
3 errors
|
s471066843 | p00078 | C | #include <stdio.h>
#include <string.h>
int main(){
int number = 0;
int magic[100][100];
int i;
int j;
int position[2] = {};
// int insert[100][100];
scanf("%d", &number);
position[0] = number - 1;
position[1] = number/2;
// magic[number - 1][(number/2 + 1) - 1] = 1;
for(i = 0; i < number; i++)... | main.c: In function 'main':
main.c:32:18: error: subscripted value is neither array nor pointer nor vector
32 | position[i][j];
| ^
|
s357214847 | p00078 | C++ | include<bits/stdc++.h>
using namespace std;
int main(){
int n;
while(cin >> n , n) {
int mass[20][20]={0};
int nowx = n / 2;
int nowy = nowx + 1;
int limit = n * n + 1;
int cou = 2;
mass[nowy][nowx] = 1;
while(cou != limit) {
if(mass[(nowy+1)%n][(nowx+1)%n] == 0){
nowy = (nowy + ... | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | while(cin >> n , n) {
| ^~~
a.cc:31:9: error: 'printf' was not declared in this scope
31 | printf("%4d",... |
s211971904 | p00078 | C++ | #include<bits/stdc++.h>
using namespace std;
vector<vector<int>> anser;
int n;
bool input(){
cin>>n;
if(n == 0)return false;
return true;
}
int main(){
while(input()){
solve();
output();
}
void solve(){
int c = n/2;
int h = n/2+1;
anser.clear();
anser.resize(n);
for(int i = 0;i < n;i ++)... | a.cc: In function 'int main()':
a.cc:13:5: error: 'solve' was not declared in this scope
13 | solve();
| ^~~~~
a.cc:14:5: error: 'output' was not declared in this scope
14 | output();
| ^~~~~~
a.cc:17:13: error: a function-definition is not allowed here before '{' token
17 | void so... |
s867193961 | p00078 | C++ | #define _USE_MATH_DEFINES
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<list>
#include<stack>
#include<queue>
#include<cctype>
#include<iomanip>
#include<functional>
#include<numeric>
#include<map>
#include<set>
#define EPS 1e-10
using namespace std;
... | a.cc:23:37: warning: trigraph ??> ignored, use -trigraphs to enable [-Wtrigraphs]
23 | vector<vector<int >???>v(n, vector<int>(n));
a.cc: In function 'int main()':
a.cc:23:39: error: template argument 1 is invalid
23 | vector<vector<int >???>v(n, vector<int>(n));
| ... |
s284478871 | p00078 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<queue>
#include<map>
using namespace std;
int main() {
int a[15][15];
int b;
while (cin >> b, b) {
memset(a, -1, sizeof(a));
int x = b / 2 + 1, y = b / 2;
a[x][y] = 1;
for (int c = 2; c <= b * b; c++) {
x++; y++;
while (1) ... | a.cc: In function 'int main()':
a.cc:13:17: error: 'memset' was not declared in this scope
13 | memset(a, -1, sizeof(a));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<map>
+++ |+#in... |
s436871208 | p00078 | C++ | #include <stdio.h>
int main(int argc, char **argv)
{
int n, **a, i, j, t=0;
while(1){
scanf("%d", &n);
if(n == 0){
break;
}
a = (int **)calloc(n, sizeof(int));
for(i = 0; i < n; i++){
a[i] = (int *)calloc(n, sizeof(int));
}
i = n/2+1;
j = n/2;
t = 1;
while(t <= n*n){
if(a[i][j] !... | a.cc: In function 'int main(int, char**)':
a.cc:13:29: error: 'calloc' was not declared in this scope
13 | a = (int **)calloc(n, sizeof(int));
| ^~~~~~
a.cc:2:1: note: 'calloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
... |
s374191391 | p00078 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
using namespace std;
int main(){
int n;
int field[16][16];
while(cin>>n&&n!=0){
memset(field,0,sizeof(field));
field[(n/2)+1][n/2]=1;
int cx=n/2;
int cy=(n/2)+1;
int num=2;
int sw=0;
while(1){
if(sw==0... | a.cc: In function 'int main()':
a.cc:14:17: error: 'memset' was not declared in this scope
14 | memset(field,0,sizeof(field));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <cstdio>
... |
s788078561 | p00078 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<cstdio>
#include<cstdlib>
using namespace::std;
int main(){
int number;
int i, j;
int center = 0;
int h = 0;
int w = 0;
cin>>number;
while(number != 0){
int magic[number][number];
memset(magic, -1, sizeof(magic));
center = number/2;
... | a.cc: In function 'int main()':
a.cc:20:3: error: 'memset' was not declared in this scope
20 | memset(magic, -1, sizeof(magic));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<cstdlib>
+++ |+#include <cstring>
... |
s001763401 | p00078 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int a[15][15];
int main(){
int n;
while(cin>>n&&n){
memset(a,0,sizeof(a));
int y=n/2+1,x=n/2;
int cur=1;
while(cur<=n*n){
if(a[y][x]==0){
a[y][x]=cur++;
y++;x++;
}else{
y++;x--;
}
if(x<0)x=n-1;
else if(n<=x)x=0;
if(n<=y)y... | a.cc: In function 'int main()':
a.cc:9:17: error: 'memset' was not declared in this scope
9 | memset(a,0,sizeof(a));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#inc... |
s955704951 | p00078 | C++ | #include <iomanip>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int magic(int n){
int c=1,x=n/2,y=x+1;
while(1){
A[y][x]=c;
if(c== n*n)break;
while(1){
x=(x+1)%n;
y=(y+1)%n;
if(A[y][x]==0)break;
x=(x+n-1)%n;
y=(y+1)%n;
if(A[y][x]==0)break;
}
c++;
}
return... | a.cc: In function 'int magic(int)':
a.cc:9:17: error: 'A' was not declared in this scope
9 | A[y][x]=c;
| ^
a.cc: In function 'int main()':
a.cc:26:17: error: 'A' was not declared in this scope
26 | A.resize(n);
| ^
|
s967342611 | p00079 | C | #include<math.h>
int main() {
double x[21], y[21], ans = 0;
int n = 0;
while (scanf("%lf,%lf", &x[n], &y[n]) != EOF) {
n++;
}
for (int i = 1; i < n; i++) {
double s = (x[i] - x[0])*(y[i + 1] - y[0]) - (x[i + 1] - x[0])*(y[i] - y[0]);
if (s < 0)s *= -1;
ans += s;
}
printf("%.8lf", ans);
}
| main.c: In function 'main':
main.c:6:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | while (scanf("%lf,%lf", &x[n], &y[n]) != EOF) {
| ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
1 | #include<math.h>
+++... |
s153329468 | p00079 | C | #include <stdio.h>
#include <math.h>
int main(){
int i,j;
double x[20],y[20],s=0;
//値の読み込み
for(i=0;i<20 ;i++){
if(scanf("%lf%lf",&x[i],&y[i]) ==EOF) break;
//scanf("%lf%lf",&x[i],&y[i]);
j=i;
}
n=i-1;
for(i=0;i<n;i++){
s+=(fabs(x[i]*y[i+1]-x[i+1]*y[i])/2.0);
... | main.c: In function 'main':
main.c:13:9: error: 'n' undeclared (first use in this function)
13 | n=i-1;
| ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
|
s537921080 | p00079 | C | #include <stdio.h>
#include <math.h>
int main(){
int i=0,j;
double x[20],y[20],s=0;
//値の読み込み
while(scanf("%lf,%lf\n",&x[i],&y[i]) !=EOF) {
//scanf("%lf%lf",&x[i],&y[i]);
i++;
}
j=i
for(i=1;i<j;i++){
s+=(x[i]*y[i+1]-x[i+1]*y[i]);
}
s+=(x[i]*y[0]-x[0]*y[i]);)
... | main.c: In function 'main':
main.c:12:12: error: expected ';' before 'for'
12 | j=i
| ^
| ;
13 | for(i=1;i<j;i++){
| ~~~
main.c:16:34: error: expected statement before ')' token
16 | s+=(x[i]*y[0]-x[0]*y[i]);)
| ... |
s010243559 | p00079 | C | #include <stdio.h>
#include <math.h>
int main(){
int i=0,j;
double x[20],y[20],s=0;
//値の読み込み
while(scanf("%lf,%lf\n",&x[i],&y[i]) !=EOF) {
//scanf("%lf%lf",&x[i],&y[i]);
i++;
}
j=i
for(i=1;i<j;i++){
s+=(x[i]*y[i+1]-x[i+1]*y[i]);
}
s+=(x[i]*y[0]-x[0]*y[i]);
... | main.c: In function 'main':
main.c:12:12: error: expected ';' before 'for'
12 | j=i
| ^
| ;
13 | for(i=1;i<j;i++){
| ~~~
|
s301895997 | p00079 | C | #include<stdio.h>
</stdio.h>
typedef struct vec vec;
struct vec {
double x, y;
};
/* 便利なコンストラクタ関数*/
static vec P(double x, double y) {
vec p = {x, y};
return p;
}
static vec add(vec a,vec b){
return Vec(a.x + b.y, a.y + b.y);
}
static vec add(vec a,vec b){
return Vec(a.x - b.y, a.... | main.c:3:1: error: expected identifier or '(' before '<' token
3 | </stdio.h>
| ^
main.c:13:8: error: unknown type name 'vec'
13 | static vec P(double x, double y) {
| ^~~
main.c: In function 'P':
main.c:14:5: error: unknown type name 'vec'; use 'struct' keyword to refer to the type
14 | ... |
s366721056 | p00079 | C | #include <bits/stdc++.h>
using namespace std;
int n, x[128], y[128];
double cpx(int p, int q, int i)
{
if(y[p] < y[q]) swap(p,q);
double a = y[p]-i, b = i-y[q];
return (b*x[p]+a*x[q])/(a+b);
}
int solve()
{
int ans = 0, li = *min_element(y,y+n), ri = *max_element(y,y+n);
for (i... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s017917303 | p00079 | C | #include <stdio.h> #include <math.h> double area3(double x1, double y1, double x2, double y2, double x3, double y3) { double a, b, c, z; a = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); b = sqrt((x1-x3)*(x1-x3) + (y1-y3)*(y1-y3)); c = sqrt((x2-x3)*(x2-x3) + (y2-y3)*(y2-y3)); z = (a+b+c)/2.0; return sqrt(z*(z-a)*(z-b)*(z-c)... | main.c:1:20: warning: extra tokens at end of #include directive
1 | #include <stdio.h> #include <math.h> double area3(double x1, double y1, double x2, double y2, double x3, double y3) { double a, b, c, z; a = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); b = sqrt((x1-x3)*(x1-x3) + (y1-y3)*(y1-y3)); c = sqrt((x2-x3)*(x2-... |
s545576039 | p00079 | C | #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
const int MAX = 20;
typedef pair<long double,long double> P;
P data[MAX];
int rev;
long double ans;
long double getlength(int i, int j){
return sqrt((data[i].first - data[j].first)*(data[i].first - data[j].first)+
(data[i].second - dat... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s777135014 | p00079 | C | #include<cmath>
#include<cstdio>
using namespace std;
const int MAX = 20;
typedef pair<long double,long double> P;
P data[MAX];
int rev;
long double ans;
long double getlength(int i, int j){
return sqrt((data[i].first - data[j].first)*(data[i].first - data[j].first)+
(data[i].second - data[j].second)*(data[... | main.c:1:9: fatal error: cmath: No such file or directory
1 | #include<cmath>
| ^~~~~~~
compilation terminated.
|
s392448456 | p00079 | C++ | #include <iostream>
#include <cmath>
#include <cstdio>
#include <complex>
#include <vector>
#include <iomanip>
#define EPS 1e-10
#define EQ(a,b) (abs(a - b) < EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()))
using namespace std;
typedef complex<double> P;
double cross (P a, P b) {
... | a.cc: In function 'std::vector<std::complex<double> > convex_hull(std::vector<std::complex<double> >)':
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
25 | sort(ps.begin(), ps.end(), cmp_x);
| ^~~~
| sqrt
|
s742750171 | p00079 | C++ | #include <bits/stdc++.h>
#define MAX_N 20
using namespace std;
typedef complex<double> P;
P data[MAX_N];
double distance(P a, P b) {
double diffx = b.real()-a.real(), diffy = b.imag()-a.imag();
return(sqrt(diffx*diffx+diffy*diffy));
}
double areaOfTriangle(P a, P b, P c) {
double ret;
double A = dista... | a.cc: In function 'void solve(int)':
a.cc:23:29: error: reference to 'data' is ambiguous
23 | S += areaOfTriangle(data[0], data[r], data[r+1]);
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
f... |
s800935650 | p00079 | C++ | #include <bits/stdc++.h>
#include <complex>
#define MAX_N 20
using namespace std;
typedef complex<double> P;
P data[MAX_N];
double distance(P a, P b) {
double diffx = b.real()-a.real(), diffy = b.imag()-a.imag();
return(sqrt(diffx*diffx+diffy*diffy));
}
double areaOfTriangle(P a, P b, P c) {
double ret;
... | a.cc: In function 'void solve(int)':
a.cc:24:29: error: reference to 'data' is ambiguous
24 | S += areaOfTriangle(data[0], data[r], data[r+1]);
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
f... |
s834950420 | p00079 | C++ | #include <complex>
#include <cmath>
typedef complex<double> xy_t;
xy_t P[110];
int main(){
int N = 0;
double x,y ;
while(scanf("%lf,%lf",&x,&y)){
P[N++] =xy_t(x,y);
}
double sum = 0.0;
for (int i=0;i+2<N;++i){
xy_t a=P[0],b=P[i+1], c= P[i+2];
sum += ((b.real()-a.real())*(c.imag()-a.imag())+(c.r... | a.cc:3:9: error: 'complex' does not name a type
3 | typedef complex<double> xy_t;
| ^~~~~~~
a.cc:4:1: error: 'xy_t' does not name a type
4 | xy_t P[110];
| ^~~~
a.cc: In function 'int main()':
a.cc:10:5: error: 'P' was not declared in this scope
10 | P[N++] =xy_t(x,y);
| ^
a... |
s943543784 | p00079 | C++ | #include <complex>
#include <cmath>
typedef complex<double> xy_t;
xy_t P[110];
int main(){
int N = 0;
double x,y ;
while(scanf("%lf,%lf",&x,&y)){
P[N++] =xy_t(x,y);
}
double sum = 0.0;
for (int i=0;i+2<N;++i){
xy_t a=P[0],b=P[i+1], c= P[i+2];
sum += ((b.real()-a.real())*(c.imag()-a.imag())+(c.r... | a.cc:3:9: error: 'complex' does not name a type
3 | typedef complex<double> xy_t;
| ^~~~~~~
a.cc:4:1: error: 'xy_t' does not name a type
4 | xy_t P[110];
| ^~~~
a.cc: In function 'int main()':
a.cc:10:5: error: 'P' was not declared in this scope
10 | P[N++] =xy_t(x,y);
| ^
a... |
s658311395 | p00079 | C++ | #include<iostream>
#include<complex>
#include<cmath>
typedef complex<double> comp;
double crs_prod(comp a, comp b) { return (conj(a)*b).imag(); }
double c1, c2;
double area = 0;
comp z[20];
int n = 0;
int main(){
while(~scanf("%lf,%lf", &c1, &c2)){
z[n] = comp(c1, c2);
n++;
}
for(int i=1; i<n-1; i++){
area +... | a.cc:4:9: error: 'complex' does not name a type
4 | typedef complex<double> comp;
| ^~~~~~~
a.cc:6:17: error: 'comp' was not declared in this scope
6 | double crs_prod(comp a, comp b) { return (conj(a)*b).imag(); }
| ^~~~
a.cc:6:25: error: 'comp' was not declared in this scop... |
s971201040 | p00079 | C++ | #include <complex>
#include <cmath>
#include <iostream>
using namespace std;
typedef complex<double> xy_t;
xy_t P[110], a, b, c;
double cross_product(xy_t a,xy_t b) {
return (conj(a)*b).imag()/2.0;
}
int main () {
int N=0; //??????????????????????????°???N??¨??????
double x, y;
while (cin>x && cin>y) {
P[... | a.cc: In function 'int main()':
a.cc:15:13: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
15 | while (cin>x && cin>y) {
| ~~~^~
| | |
| | double
| std::istream {aka std::basic_istream<... |
s988758006 | p00079 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <complex.h>
#include <cmath.h>
using namespace std;
type of complex<double> xy_t;
xy_t P[110];
int main(){
int N = 0;
double x,y;
while(scanf("%lf,%lf",&x, &y)) {
P[N++] = xy_t(x,y);
double sum = 0.0;
for(int i = 0; i+ 2<N; ++i) {
xy_... | a.cc:5:10: fatal error: cmath.h: No such file or directory
5 | #include <cmath.h>
| ^~~~~~~~~
compilation terminated.
|
s852182363 | p00079 | C++ | #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <complex>
#include <cmath>
using namespace std;
typedef complex<double> xy_t;
xy_t P[110];
int main(){
int N = 0;
double x,y;
while(-scanf("%lf,%lf",&x, &y)) {
P[N++] = xy_t(x,y);
double sum = 0.0;
for(int i = 0; i+ 2<... | a.cc: In function 'int main()':
a.cc:25:23: error: 'sum' was not declared in this scope
25 | printf("%.6f\n",abs(sum));
| ^~~
|
s427468172 | p00079 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main(){
double x[20], y[20], a, b, c, s = 0.0, z;
int i;
for (i = 0; i < 20; i++){
if (scanf_s("%lf,%lf", &x[i], &y[i]) == EOF) break;
}
for (int j = 1; j < i - 1; j++){
a = sqrt((x[j] - x[0]) * (x[j] - x[0]) + (y[j] - y[0]) * (y[... | a.cc: In function 'int main()':
a.cc:10:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
10 | if (scanf_s("%lf,%lf", &x[i], &y[i]) == EOF) break;
| ^~~~~~~
| scanf
|
s842987726 | p00079 | C++ |
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <ctime>
#include <string>
#include <map>
#include <stack>
#include <queue>
#include <complex>
using namespace std;
typedef complex<double> xy_t;
char c;
xy_t P[20];
const int MAX = 10000000;
int... | a.cc: In function 'int main()':
a.cc:37:32: error: 'cross_product' was not declared in this scope
37 | ans += cross_product(xy_t (P[i] - P[0]), xy_t (P[i + 1] - P[0]))
| ^~~~~~~~~~~~~
|
s192851461 | p00079 | C++ | #include <iostream>
#include <complex>
#include <cmath>
using namespace std;
int main() {
typedef complex<double> xy;
double x1, y1, x2, y2, s;
xy z1, z2;
s = 0.0;
scanf( "%lf, %lf", &x1, &y1 );
while ( scanf( "%lf, %lf", &x2, &y2 ) {
z1 = xy( x1, y1 );
z2 = xy( x2, y2 );
s += ( conj( z1 ) * z2 ).real() / ... | a.cc: In function 'int main()':
a.cc:12:46: error: expected ')' before '{' token
12 | while ( scanf( "%lf, %lf", &x2, &y2 ) {
| ~ ^~
| )
|
s193274519 | p00079 | C++ | #include <iostream>
#include <complex>
#include <cmath>
#include <cstdio>
using namespace std;
int main() {
typedef complex<double> xy;
xy p[20];
int n = 0;
double x, y, s;
while ( ~scanf( "%lf, %lf", &x, &y ) ) {
p[n++] = xy( x, y );
}
for ( i = 1; i < n - 1; i++ ) {
s += ( conj( p[i] - p[0] ) * ( p[i + 1]... | a.cc: In function 'int main()':
a.cc:15:15: error: 'i' was not declared in this scope
15 | for ( i = 1; i < n - 1; i++ ) {
| ^
|
s534457604 | p00079 | C++ | #include <iostream>
#include <complex>
#include <cmath>
#include <cstdio>
using namespace std;
int main() {
typedef complex<double> xy;
xy p[20];
int n = 0;
double x, y, s;
while ( ~scanf( "%lf, %lf", &x, &y ) ) {
p[n++] = xy( x, y );
}
for ( i = 1; i < n - 1; i++ ) {
s += ( conj( p[i] - p[0] ) * ( p[i + 1]... | a.cc: In function 'int main()':
a.cc:15:15: error: 'i' was not declared in this scope
15 | for ( i = 1; i < n - 1; i++ ) {
| ^
|
s830632382 | p00079 | C++ | include <iostream>
#include <stdio.h>
#include <complex>
#include <cmath>
using namespace std;
typedef complex<double> xy_t;
double dot_product(xy_t a, xy_t b){
return (conj(a)*b).real();
}
double cross_product(xy_t a, xy_t b){
return (conj(a)*b).imag();
}
int main(){
xy_t o,a,b;
doub... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/math.h:275,
from /usr/include/c++/14/cmath:47,
from /usr/include/c++/14/complex:44,
from a.cc:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h... |
s355853587 | p00079 | C++ | #include <complex>
#include <cmath>
#include <stdio.h>
typedef complex<double> xy_t;
using namespace std;
xy_t P[110];
int main(){
int N = 0;
double x, y;
while (~scanf("%lf,%lf", &x, &y)) {
P[N++] = xy_t(x,y);
}
double sum = 0.0;
for (int i = 0; i+2 < N; i++) {
xy_t a = P[0], b = P[i+1], c = P[i+2];
sum ... | a.cc:4:9: error: 'complex' does not name a type
4 | typedef complex<double> xy_t;
| ^~~~~~~
a.cc:7:1: error: 'xy_t' does not name a type
7 | xy_t P[110];
| ^~~~
a.cc: In function 'int main()':
a.cc:13:17: error: 'P' was not declared in this scope
13 | P[N++] = xy_t(x,y);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.