submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s903885905 | p00016 | C++ | #include<cstdio>
#include<iostream>
#include<cmath>
using namespace std;
#define pi 3.14
int main()
{
int x = 0, y = 0;
double d = 0, a = 90, r = 360;
while (d != 0 || r != 0) {
scanf_s("%lf,%lf", &d, &r);
x = x + d * cos(a / 360 * 2 * pi);
y = y + d * sin(a / 360 * 2 * pi);
a = a + r;
}
cout << x << end... | a.cc: In function 'int main()':
a.cc:13:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
13 | scanf_s("%lf,%lf", &d, &r);
| ^~~~~~~
| scanf
|
s641659060 | p00016 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>a
#include<cmath>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
#define X real()
#define Y imag()
t... | a.cc:10:9: fatal error: stack>: No such file or directory
10 | #include<stack>a
| ^~~~~~~~
compilation terminated.
|
s890075237 | p00016 | C++ | #define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>
#include <fstream>
#include <array>
#include <utility>
#include <functional>
#include <stack>
#include <math.h>
using namespace std;
typedef long long Int;
#define REP(i , x) for(Int ... | a.cc: In function 'int main()':
a.cc:30:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
30 | while (scanf_s("%d,%d", &a, &b), a&&b){
| ^~~~~~~
| scanf
a.cc:36:11: error: invalid operands of types 'double' and 'int' to binary 'operator%'
... |
s345860087 | p00016 | C++ | #define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>
#include <fstream>
#include <array>
#include <utility>
#include <functional>
#include <stack>
#include <math.h>
using namespace std;
typedef long long Int;
#define REP(i , x) for(Int ... | a.cc: In function 'int main()':
a.cc:36:11: error: invalid operands of types 'double' and 'int' to binary 'operator%'
36 | y %= 10;
| ~~^~~~~
a.cc:36:11: note: in evaluation of 'operator%=(double, int)'
a.cc:40:11: error: invalid operands of types 'double' and 'int' to binary 'operator%'
4... |
s806155866 | p00016 | C++ | #define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>
#include <fstream>
#include <array>
#include <utility>
#include <functional>
#include <stack>
#include <math.h>
using namespace std;
typedef long long Int;
#define REP(i , x) for(Int ... | a.cc: In function 'int main()':
a.cc:41:16: error: expected initializer before 'x'
41 | int x_ x;
| ^
a.cc:42:9: error: 'x_' was not declared in this scope; did you mean 'y_'?
42 | x_ %= 10;
| ^~
| y_
|
s647051542 | p00016 | C++ | #include <iostream>
#include <math.h>
#include <stdlib>
using namespace std;
#define PI 3.14159265
int main()
{
double x=0,y=0;
int r,dth,th=0;
while(true){
scanf("%d,%d",&r,&dth);
if(!r&&!dth)break;
x+=r*sin((double)th*PI/180);
y+=r*cos((double)th*PI/180);
th+=dth;
}
cout<<int(x)<<endl;
cout<<int(y)... | a.cc:3:10: fatal error: stdlib: No such file or directory
3 | #include <stdlib>
| ^~~~~~~~
compilation terminated.
|
s406058437 | p00016 | C++ | #include <iostream>
#include <math.h>
#include <stdlib>
#include <cstdio>
using namespace std;
#define PI 3.14159265
int main()
{
double x=0,y=0;
int r,dth,th=0;
while(true){
scanf("%d,%d",&r,&dth);
if(!r&&!dth)break;
x+=r*sin((double)th*PI/180);
y+=r*cos((double)th*PI/180);
th+=dth;
}
cout<<int(x)<<e... | a.cc:3:10: fatal error: stdlib: No such file or directory
3 | #include <stdlib>
| ^~~~~~~~
compilation terminated.
|
s981282132 | p00016 | C++ | //
#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <array>
#include <numeric>
#include <functional>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<utility>
#include<complex>
using namespa... | a.cc:29:16: error: 'INT_MAX' was not declared in this scope
29 | const ll inf = INT_MAX;
| ^~~~~~~
a.cc:19:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
18 | #include<complex>
+++ |+#include <climits>
19 |
|
s466487140 | p00016 | C++ | import sys
import itertools
import math
curdeg = 0
xstep = 0
ystep = 0
for line in sys.stdin.readlines():
step, deg = map(int, line.split(","))
xstep += step * math.cos(math.pi * curdeg / 180)
ystep += step * math.sin(math.pi * curdeg / 180)
curdeg += deg
print("{:.0f}".format(ystep))
print("{:.0f}"... | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s935027006 | p00016 | C++ | #include<iostream>
#include<cmath>
#difine PI 3.14159265359
using namespace std;
int main(){
int d, a = 90, a2;
double x,y;
char c;
while(cin >> d >> c >> a2){
if(d == 0 && a == 0) break;
double rad = a * (PI / 180);
x += d * cos(rad);
y += d * sin(rad);
a += a2;
}
}
cout << (int)x... | a.cc:3:2: error: invalid preprocessing directive #difine; did you mean #define?
3 | #difine PI 3.14159265359
| ^~~~~~
| define
a.cc: In function 'int main()':
a.cc:12:23: error: 'PI' was not declared in this scope
12 | double rad = a * (PI / 180);
| ^~
a.cc: At globa... |
s747457801 | p00016 | C++ | #include<iostream>
#include<cmath>
#define PI 3.14159265359
using namespace std;
int main(){
int d, a = 90, a2;
double x,y;
char c;
while(cin >> d >> c >> a2){
if(d == 0 && a == 0) break;
double rad = a * (PI / 180);
x += d * cos(rad);
y += d * sin(rad);
a += a2;
}
}
cout << (int)x... | a.cc:18:3: error: 'cout' does not name a type
18 | cout << (int)x << "\n" << (int)y << endl;
| ^~~~
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s816855883 | p00016 | C++ | #define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<list>
#include<stack>
#include<queue>
#include<iomanip>
#include<functional>
using namespace std;
typedef long long llong;
double digrad(double dig) { return dig*M_PI / 180.0; }
int main() {
doub... | a.cc:26:19: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
26 | ????????????//cout << "x: " << x << " y: " << y << endl;
a.cc: In function 'int main()':
a.cc:26:9: error: expected primary-expression before '?' token
26 | ????????????//cout << "x: " << x << " y: " << y << e... |
s043587245 | p00016 | C++ | #include <cstdio>
#include <algorithm>
#include <complex>
using namespace std;
using Point=complex<double>;
static const double PI=3.141592653589793;
int main() {
Point arg=polar(1.0, PI/2);
Point target=0+0i;
while (true) {
double d, a;
scanf("%lf, %lf", &d, &a);
if (d == 0.0 &... | a.cc: In function 'int main()':
a.cc:13:19: error: no match for 'operator+' (operand types are 'int' and 'std::complex<double>')
13 | Point target=0+0i;
| ~^~~
| | |
| | std::complex<double>
| int
In file included from /u... |
s933165950 | p00016 | C++ | #include<iostream>
#include<math.h>
#include<stdio.h>
using namespace std;
int main() {
double sum,x,y,b,c;
int a, d;
a = 0;
x = 0;
y = 0;
sum = 0;
while (scanf_s("%d,%d",&d,&a)) {
if (a == 0 && d == 0) break;
b = (double)a;
c = (double)d;
x += c*cos(sum*3.1416/180);
y += c*sin(sum*3.1416/180);
sum +... | 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,%d",&d,&a)) {
| ^~~~~~~
| scanf
|
s089045332 | p00016 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
cout << fixed << setprecision(0);
ios :: sync_with_stdio(false);
db d, t; char c;
db x, y, a;
while(cin >> d >> c >> t) {
a -= t;
x += d * cos(a);
y += d * sin(a);
}
cout << x << ' ' << y << '\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'db' was not declared in this scope
7 | db d, t; char c;
| ^~
a.cc:8:11: error: expected ';' before 'x'
8 | db x, y, a;
| ^~
| ;
a.cc:9:22: error: 'd' was not declared in this scope
9 | whi... |
s220152431 | p00016 | C++ | import Data.List.Split
type Dir = [Double]
type Round = Double
solve :: Round -> Dir -> [Double] -> Dir
solve _ d [] = d
solve r [f,s] (x:y:xs) = solve (y+r) (f+x*sin (pi/180*r) : s+x*cos (pi/180*r):[]) xs
floor' :: Double -> Int
floor' d
| d < 0 = (0-) $ floor $ -d
| otherwise = floor d
main = getContents >>= p... | a.cc:9:6: warning: missing terminating ' character
9 | floor' :: Double -> Int
| ^
a.cc:9:6: error: missing terminating ' character
9 | floor' :: Double -> Int
| ^~~~~~~~~~~~~~~~~~
a.cc:10:6: warning: missing terminating ' character
10 | floor' d
| ^
a.cc:10:6: error: missing... |
s621429472 | p00016 | C++ | #define _USE_MATH_DEFINES
#include <iostream>
#include <stack>
using namespace std;
double rad(int degree){
return (M_PI*degree) / 180;
}
int main(){
double x = 0, y = 0;
int d, dir = 90, a;
char comma;
while (cin >> d >> comma >> a, d || a){
x += d * cos(rad(dir));
y += d * sin(rad(dir));
dir -= a;
}
... | a.cc: In function 'double rad(int)':
a.cc:8:17: error: 'M_PI' was not declared in this scope
8 | return (M_PI*degree) / 180;
| ^~~~
a.cc: In function 'int main()':
a.cc:18:26: error: 'cos' was not declared in this scope
18 | x += d * cos(rad(dir));
| ... |
s228520299 | p00016 | C++ | /*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/
#define _USE_MATH_DEFINES
#include <iostream> // ?¨??????\??????
#include <fstream> // ??????????????\??????
#include <string> // ???????????¢???
#include <vector> // ???????????????
#include <cmath> // ??°??????
#include <io... | a.cc: In function 'int main()':
a.cc:31:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
31 | scanf_s("%lf,%lf", &d, &a); // double?????????????????????%f??§????????????%lf?????????
| ^~~~~~~
| scanf
|
s658793649 | p00016 | C++ | import math
x = y = n= 0
while True:
d,a = map(int,input().split(','))
if d == a == 0: break
x += d*math.sin(math.radians(n))
y += d*math.cos(math.radians(n))
n+=a
print(*map(int,(x,y)),sep='\n')
| a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s582316564 | p00016 | C++ | #define _USE_MATH_DEFINES
#include<iostream>
int main()
{
double x = 0, y = 0;
int a = 90;
while (true)
{
int di, ai;
char temp;
std::cin >> di >> temp >> ai;
if (di == 0 && ai == 0)
{
break;
}
x += di * cos(a * M_PI / 180);
y += di * sin(a * M_PI / 180);
a -= ai;
}
std::cout << static_cast<i... | a.cc: In function 'int main()':
a.cc:16:35: error: 'M_PI' was not declared in this scope
16 | x += di * cos(a * M_PI / 180);
| ^~~~
a.cc:16:27: error: 'cos' was not declared in this scope
16 | x += di * cos(a * M_PI / 180);
| ... |
s120171862 | p00016 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
#define add push_back
#define inf 2147000000
#define pi 3.1415926535
#define rep(i,n) for(int i=0;i<n;i++)
#define out(a) cout<<a<<endl;
using namespace std;
int main(void){
double x,y,kk=pi/2;
string str;
char* bin;
x=0... | a.cc: In function 'int main()':
a.cc:36:20: error: 'cos' was not declared in this scope
36 | x+=cos(kk)*a1;
| ^~~
a.cc:37:20: error: 'sin' was not declared in this scope; did you mean 'bin'?
37 | y+=sin(kk)*a1;
| ^~~
| ... |
s814222582 | p00016 | C++ | #include <iostream>
#include <numeric>
#include <cstdlib>
using namespace std;
int main(){
double x = 0.0;
double y = 0.0;
double angle = 90.0;
for(;;){
double hos;
double change;
char c;
cin >> hos >> c >> change;
if(hos == 0 && change == 0) break;
x += hos * cos(angle * 3.14159 / 180);
y += hos * s... | a.cc: In function 'int main()':
a.cc:16:28: error: 'cos' was not declared in this scope; did you mean 'hos'?
16 | x += hos * cos(angle * 3.14159 / 180);
| ^~~
| hos
a.cc:17:28: error: 'sin' was not declared in this scope
17 | ... |
s672171964 | p00016 | C++ | #include <iostream>
#include <numeric>
#include <cstdlib>
using namespace std;
int main(){
double x = 0.0;
double y = 0.0;
double angle = 90.0;
for(;;){
double hos;
double change;
char c;
cin >> hos >> c >> change;
if(hos == 0 && change == 0) break;
x += hos * std::cos(angle * 3.14159 / 180);
y += ho... | a.cc: In function 'int main()':
a.cc:16:33: error: 'cos' is not a member of 'std'; did you mean 'ios'?
16 | x += hos * std::cos(angle * 3.14159 / 180);
| ^~~
| ios
a.cc:17:33: error: 'sin' is not a member of 'std'; did you me... |
s713768525 | p00016 | C++ | #include <iostream>
using namespace std;
int main(){
double x = 0.0, y = 0.0;
double hosu;
double angle = 90.0;
double change;
char c;
while(cin >> hosu >> c >> change){
if(hosu == 0 && change == 0) break;
x += hosu * cos(angle / 180 * 3.14159);
y += hosu * sin(angle / 180 * 3.14159);
angle -= change;
}... | a.cc: In function 'int main()':
a.cc:12:29: error: 'cos' was not declared in this scope
12 | x += hosu * cos(angle / 180 * 3.14159);
| ^~~
a.cc:13:29: error: 'sin' was not declared in this scope
13 | y += hosu * sin(angle / 180 * 3.14159);
| ... |
s661888268 | p00016 | C++ | d;double x,y,c;main(s){for(;~scanf("%d,%d",&s,&d);c+=d/57.29578)x+=s*sin(c),y+=s*cos(c);exit(!printf("%d\n%d\n",d=x,s=y));} | a.cc:1:1: error: 'd' does not name a type
1 | d;double x,y,c;main(s){for(;~scanf("%d,%d",&s,&d);c+=d/57.29578)x+=s*sin(c),y+=s*cos(c);exit(!printf("%d\n%d\n",d=x,s=y));}
| ^
a.cc:1:20: error: expected constructor, destructor, or type conversion before '(' token
1 | d;double x,y,c;main(s){for(;~scanf("%d,%... |
s418776317 | p00016 | C++ | #include <iostream>
#define M_PI 3.141592653589793
using namespace std;
int debug = 0;
int main(void){
int len, deg, direction=90;
double x=0, y=0;
int i_x, i_y;
while(cin >> len){
cin.ignore(); //read ,
cin >> deg;
if(len == 0 && deg == 0) break;
//proceed
x += len * cos(direction * M_PI / 180);
... | a.cc: In function 'int main()':
a.cc:21:28: error: 'cos' was not declared in this scope
21 | x += len * cos(direction * M_PI / 180);
| ^~~
a.cc:22:28: error: 'sin' was not declared in this scope
22 | y += len * sin(direction * M_PI / 180);
| ... |
s391368391 | p00016 | C++ | #include <iostream>
#define M_PI 3.141592653589793
using namespace std;
int debug = 0;
int main(void){
int len, deg, direction=90;
double x=0, y=0;
int i_x, i_y;
while(cin >> len){
cin.ignore(); //read ,
cin >> deg;
if(len == 0 && deg == 0) break;
//proceed
x += len * cos(direction * M_PI / 180);
... | a.cc: In function 'int main()':
a.cc:21:28: error: 'cos' was not declared in this scope
21 | x += len * cos(direction * M_PI / 180);
| ^~~
a.cc:22:28: error: 'sin' was not declared in this scope
22 | y += len * sin(direction * M_PI / 180);
| ... |
s866446159 | p00016 | C++ | #include <iostream>
using namespace std;
int debug = 0;
int main(void){
int len, deg, direction=90;
double x=0, y=0;
int i_x, i_y;
while(cin >> len){
cin.ignore(); //read ,
cin >> deg;
if(len == 0 && deg == 0) break;
//proceed
x += len * cos(direction * 3.14159265358979 / 180);
y += len * sin(dire... | a.cc: In function 'int main()':
a.cc:19:28: error: 'cos' was not declared in this scope
19 | x += len * cos(direction * 3.14159265358979 / 180);
| ^~~
a.cc:20:28: error: 'sin' was not declared in this scope
20 | y += len * sin(direction * 3.14159265... |
s952439298 | p00016 | C++ | #include <iostream>
#define M_PI 3.141592653589793
using namespace std;
int debug = 0;
int main(void){
int len, deg, direction=90;
double x=0, y=0;
int i_x, i_y;
while(cin >> len){
cin.ignore(); //read ,
cin >> deg;
if(len == 0 && deg == 0) break;
//proceed
x += len * cos(direction * M_PI / 180);
... | a.cc: In function 'int main()':
a.cc:21:28: error: 'cos' was not declared in this scope
21 | x += len * cos(direction * M_PI / 180);
| ^~~
a.cc:22:28: error: 'sin' was not declared in this scope
22 | y += len * sin(direction * M_PI / 180);
| ... |
s585484984 | p00016 | C++ | #include <iostream>
#define M_PI 3.141592653589793
using namespace std;
int debug = 0;
int main(void){
int len, deg, direction=90;
double x=0, y=0;
int i_x, i_y;
while(cin >> len){
cin.ignore();
cin >> deg;
if(len == 0 && deg == 0) break;
x += len * cos(direction * M_PI / 180);
y += len * sin(direc... | a.cc: In function 'int main()':
a.cc:20:28: error: 'cos' was not declared in this scope
20 | x += len * cos(direction * M_PI / 180);
| ^~~
a.cc:21:28: error: 'sin' was not declared in this scope
21 | y += len * sin(direction * M_PI / 180);
| ... |
s372102087 | p00016 | C++ | #include <iostream>
#define M_PI 3.141592653589793
using namespace std;
int debug = 0;
int main(void){
int len, deg, direction=90;
double x=0, y=0;
int i_x, i_y;
while(cin >> len){
cin.ignore(); //read ,
cin >> deg;
if(len == 0 && deg == 0) break;
//proceed
x += len * cos(direction * M_PI / 180);
... | a.cc: In function 'int main()':
a.cc:21:28: error: 'cos' was not declared in this scope
21 | x += len * cos(direction * M_PI / 180);
| ^~~
a.cc:22:28: error: 'sin' was not declared in this scope
22 | y += len * sin(direction * M_PI / 180);
| ... |
s302196871 | p00016 | C++ | #include <iostream>
static const double M_PI = 6*asin(0.5);
using namespace std;
int debug = 0;
int main(void){
int len, deg, direction=90;
double x=0, y=0;
int i_x, i_y;
while(cin >> len){
cin.ignore(); //read ,
cin >> deg;
if(len == 0 && deg == 0) break;
//proceed
x += len * cos(direction * M_PI ... | a.cc:3:30: error: 'asin' was not declared in this scope
3 | static const double M_PI = 6*asin(0.5);
| ^~~~
a.cc: In function 'int main()':
a.cc:21:28: error: 'cos' was not declared in this scope
21 | x += len * cos(direction * M_PI / 180);
| ... |
s424100322 | p00016 | C++ | #include <iostream>
#include <math.h>
using namespace std;
int main(){
int step,turn;
double x=0,y=0,angle;
while(cin>>step>>",">>turn,step,turn){
x+=(double)step*sin(angle*M_PI/180);
y+=(double)step*cos(angle*M_PI/180);
angle+=(double)turn;
}
cout << (int)x << endl;
cout << (int)y << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:16: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [2]')
7 | while(cin>>step>>",">>turn,step,turn){
| ~~~~~~~~~^~~~~
| | |
| | ... |
s603463486 | p00016 | C++ | #include <cmath>
#include <cstdio>
#define calc(x) (x*M_PI/180.0)
using namespace std;
int main()
{
string str;
int a, b;
double x=0, y=0, r=0;
while(scanf("%d,%d",&a,&b) != EOF && !(a == 0 && b == 0)){
x += (double)a*sin(calc(r));
y += (double)a*cos(calc(r));
r += (double)b;
}
printf("%d\n%... | a.cc: In function 'int main()':
a.cc:10:3: error: 'string' was not declared in this scope
10 | string str;
| ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
2 | #include <cstdio>
+++ |+#include <string>
3 |
|
s765092391 | p00016 | C++ | float x,y,z;d;main(r){for(;~scanf("%d,%d",&r,&d)?y+=r*cos(z),x-=r*sin(z),z-=d/57.3,1:!printf("%d\n%d\n",d=x,r=y););} | a.cc:1:13: error: 'd' does not name a type
1 | float x,y,z;d;main(r){for(;~scanf("%d,%d",&r,&d)?y+=r*cos(z),x-=r*sin(z),z-=d/57.3,1:!printf("%d\n%d\n",d=x,r=y););}
| ^
a.cc:1:19: error: expected constructor, destructor, or type conversion before '(' token
1 | float x,y,z;d;main(r){for(;~scanf(... |
s291520970 | p00016 | C++ | float x,y,z;d;main(r){for(;~scanf("%d,%d",&r,&d)?y+=r*cos(z),x-=r*sin(z),z-=d/57.3,1:!printf("%d\n%d\n",d=x,r=y););} | a.cc:1:13: error: 'd' does not name a type
1 | float x,y,z;d;main(r){for(;~scanf("%d,%d",&r,&d)?y+=r*cos(z),x-=r*sin(z),z-=d/57.3,1:!printf("%d\n%d\n",d=x,r=y););}
| ^
a.cc:1:19: error: expected constructor, destructor, or type conversion before '(' token
1 | float x,y,z;d;main(r){for(;~scanf(... |
s323585731 | p00016 | C++ | #include <iostream>
#include <cmath>
#define PI 3.14159265;
#define RAD (PI/180)
using namespace std;
int main() {
int m, angle;
double x=0, y=0, deg=90;
while(1) {
cin >> m >> angle;
if(m==0&&angle==0)
break;
x+=(double)m*cos(deg*RAD);
y+=(double)m*sin(deg*RAD);
deg-=angle;
}
cout << (int)x << ... | a.cc: In function 'int main()':
a.cc:3:22: error: expected ')' before ';' token
3 | #define PI 3.14159265;
| ^
a.cc:4:14: note: in expansion of macro 'PI'
4 | #define RAD (PI/180)
| ^~
a.cc:17:38: note: in expansion of macro 'RAD'
17 | x+=(double)... |
s540706080 | p00016 | C++ | #include<iostream>
#include<math>
#define conv 0.0174532925199
using namespace std;
int main()
{
double x=0.0,y=0.0,m,r,rad=0;
char a;
for(;;)
{
cin >> m >> a >> r ;
if(m==0 && r==0)
break;
x+=m*sin(rad*conv);
y+=m*cos(rad*conv);
rad+=r;
}
cout << (int)x << endl;
cout << (int)y << endl;
} | a.cc:2:9: fatal error: math: No such file or directory
2 | #include<math>
| ^~~~~~
compilation terminated.
|
s559448625 | p00016 | C++ | /*AOJ 0016*/
#include<iostream>
#define M_PI 3.14159265
using namespace std;
double changeDegToRad(double deg){
return deg*M_PI/180.0;
}
int main(){
double x = 0,y = 0;
double deg = 0,walk = 0;
double rad = M_PI/2.0;
while(1){
scanf("%lf,%lf",&walk,°);
if(deg==0&&walk==0){
break;
}
x += wa... | a.cc: In function 'int main()':
a.cc:28:29: error: 'cos' was not declared in this scope
28 | x += walk * cos(rad);
| ^~~
a.cc:29:29: error: 'sin' was not declared in this scope
29 | y += walk * sin(rad);
| ^~~
|
s065852289 | p00016 | C++ | /*AOJ 0016*/
#include<iostream>
#define M_PI 3.14159265
using namespace std;
double changeDegToRad(double deg){
return deg*M_PI/180.0;
}
int main(){
double x = 0,y = 0;
double deg = 0,walk = 0;
double rad = M_PI/2.0;
while(1){
scanf("%lf,%lf",&walk,°);
if(deg==0&&walk==0){
break;
}
x += wa... | a.cc: In function 'int main()':
a.cc:28:29: error: 'cos' was not declared in this scope
28 | x += walk * cos(rad);
| ^~~
a.cc:29:29: error: 'sin' was not declared in this scope
29 | y += walk * sin(rad);
| ^~~
|
s471438487 | p00016 | C++ | #include<string>
#include<vector>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<functional>
#include<map>
#include<set>
#include<cmath>
using namespace std;
int main(){
double a,b; double c=90; double x=0; double y=0;
while(scanf("%lf%lf",&a,&b) a || b){
x+=... | a.cc: In function 'int main()':
a.cc:18:36: error: expected ')' before 'a'
18 | while(scanf("%lf%lf",&a,&b) a || b){
| ~ ^~
| )
a.cc:18:43: error: expected ';' before ')' token
18 | while(scanf("%lf%lf",&a,&b) a || b){... |
s686384809 | p00016 | C++ | ?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <math.h>
 
void walk(double current_point[2], int r, int sum_theta) {
    double pi = 3.14159265358979; 
    double rad = ((double)sum_theta / 180) * pi;
    current_point[0] ... | a.cc:32:2: error: stray '#' in program
32 |  
| ^
a.cc:34:2: error: stray '#' in program
34 |     double pi = 3.14159265358979; 
| ^
a.cc:34:9: error: stray '#' in program
34 |     double pi = 3.14159265358979; 
| ^
a.cc:34:45: error: stray '#' in ... |
s820711279 | p00016 | C++ | #include <stdio.h>
#include <math.h>
 
void walk(double current_point[2], int r, int sum_theta) {
    double pi = 3.14159265358979; 
    double rad = ((double)sum_theta / 180) * pi;
    current_point[0] += r * sin(rad);
    current_point[1] += r * cos(rad);
}
 
int... | a.cc:3:2: error: stray '#' in program
3 |  
| ^
a.cc:5:2: error: stray '#' in program
5 |     double pi = 3.14159265358979; 
| ^
a.cc:5:9: error: stray '#' in program
5 |     double pi = 3.14159265358979; 
| ^
a.cc:5:45: error: stray '#' in prog... |
s284118067 | p00016 | C++ | #include <stdio.h>
#include <string.h>
int main(){
double x,y,angle,t,r;
x=0;
y=0;
angle=M_PI/2;
while(1){
scanf("%lf,%lf",&r,&t);
if(r==0&&t==0)break;
x+=r*cos(angle);
y+=r*sin(angle);
angle+=t*M_PI/180;
}
printf("%.0f\n%.0f\n",-x,y);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'M_PI' was not declared in this scope
8 | angle=M_PI/2;
| ^~~~
a.cc:12:6: error: 'cos' was not declared in this scope
12 | x+=r*cos(angle);
| ^~~
a.cc:13:6: error: 'sin' was not declared in this scope; did you mean 'stdin'?
13 | y+=r*sin(... |
s937516356 | p00016 | C++ | #include<iostream>
#include<cmath>
#define PI 3.141592653589793
using namespace std;
int main(){
double x = 0, y = 0;
int l, a;
while(scanf_s("%d,%d",l,a) != -1){
x += l * cos(a * PI / 180);
y += l * sin(a * PI / 180);
}
cout << (int)x << endl << (int)y << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
11 | while(scanf_s("%d,%d",l,a) != -1){
| ^~~~~~~
| scanf
|
s363822397 | p00016 | C++ | #include<iostream>
#include<math.h>
#include<cstdio>
#define M_PI 3.14159265358979 /* 円周率 */
using namespace std;
int main(){
int len, deg;
int deg_now = 90;
double x = 0, y = 0;
while (1){
scanf_s("%d,%d", &len, °);
if (len == 0 && deg == 0) break;
x += len*cos(deg_now / 180.0 * M_PI);
y += len*sin(d... | a.cc:4:9: warning: "M_PI" redefined
4 | #define M_PI 3.14159265358979 /* 円周率 */
| ^~~~
In file included from /usr/include/c++/14/cmath:47,
from /usr/include/c++/14/math.h:36,
from a.cc:2:
/usr/include/math.h:1121:10: note: this is the location of the previous definiti... |
s710235438 | p00016 | C++ | #include<iostream>
#include<math.h>
#include<stdio.h>
#define M_PI 3.14159265358979 /* 円周率 */
using namespace std;
int main(){
int len, deg;
int deg_now = 90;
double x = 0, y = 0;
while (1){
scanf_s("%d,%d", &len, °);
if (len == 0 && deg == 0) break;
x += len*cos(deg_now / 180.0 * M_PI);
y += len*sin(... | a.cc:4:9: warning: "M_PI" redefined
4 | #define M_PI 3.14159265358979 /* 円周率 */
| ^~~~
In file included from /usr/include/c++/14/cmath:47,
from /usr/include/c++/14/math.h:36,
from a.cc:2:
/usr/include/math.h:1121:10: note: this is the location of the previous definiti... |
s303703506 | p00017 | Java | import java.io.*;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
Pattern p=Pattern.compile("the|this|that");
String str;
try{
while((st... | Main.java:12: error: cannot find symbol
for(int j=0;!pattern.matcher(str).find()&&j<26;j++){
^
symbol: variable pattern
location: class Main
1 error
|
s455328212 | p00017 | Java | import java.io.*;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
Pattern p=Pattern.compile("the|this|that");
String str;
while((str=br.readLine())!=null)... | Main.java:10: error: unreported exception IOException; must be caught or declared to be thrown
while((str=br.readLine())!=null){
^
1 error
|
s453526083 | p00017 | Java | import java.io.*;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
Pattern p=Pattern.compile("the|this|that");
String str;
while((str=br... | Main.java:12: error: ')' or ',' expected
for(int j=0;!p.matcher((String.valueOf(ch)).find()&&j<26;j++){
^
1 error
|
s528670491 | p00017 | Java | mport java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
while (scn.hasNext()) {
String str = scn.nextLine();
int len = str.length();
a:
while (true) {
String nstr = new String();
for (int i = 0; i < len; i++) {
int n = st... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s546504439 | p00017 | Java | import java.util.Scanner;
public class Mai {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
String moji = sc.nextLine();
char[] narabi = moji.toCharArray();
String temp = "";
for(int j = 0; j < 26; j++){
for(int i = 0; i < narabi.length; i++){
... | Main.java:2: error: class Mai is public, should be declared in a file named Mai.java
public class Mai {
^
1 error
|
s603343130 | p00017 | Java | import java.util.Scanner;
public class Mai {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
String moji = sc.nextLine();
char[] n = moji.toCharArray();
String temp = "";
for(int j = 0; j < 26; j++){
for(int i = 0; i < n.length; i++){
if('a'... | Main.java:2: error: class Mai is public, should be declared in a file named Mai.java
public class Mai {
^
1 error
|
s511711222 | p00017 | Java | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
char[] originalCharactors = sc.nextLine().toCharArray();
// ずらした文字数を調べる
int restrationCode = -1;
for (int i = 0; i < originalCharactors.length - 1; i++) {
in... | Main.java:80: error: reached end of file while parsing
}
^
1 error
|
s821537132 | p00017 | Java | class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
while(sc.hasNextLine()){
sc = new Scanner(System.in);
char[] originalCharactors = sc.nextLine().toCharArray();
// ずらした文字数を調べる
int restrationCode = -1;
for (int i = 0; i < originalCharactors.length - 1; i++) {
i... | Main.java:5: error: cannot find symbol
Scanner sc = null;
^
symbol: class Scanner
location: class Main
Main.java:8: error: cannot find symbol
sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s268032733 | p00017 | Java | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
while (sc.hasNextLine()) {
char[] originalCharactors = sc.nextLine().toCharArray();
// ずらした文字数を調べる
int restrationCode = 0;
for (int i = 0; i < originalChar... | Main.java:75: error: reached end of file while parsing
}
^
1 error
|
s877696345 | p00017 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
private static int[][] charaint;
public static void main(String[]args)throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str=br.readLine();
while(str!=... | Main.java:47: error: missing return statement
}
^
1 error
|
s618246899 | p00017 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
while(scan.hasNext()){
String line = scan.nextLine();
for(int i = 0; i < 26; i++){
String now = "";
StringBuffer sb = new StringBuffer();
for(int j = 0; j <... | Main.java:48: error: reached end of file while parsing
}
^
1 error
|
s424645123 | p00017 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
while(scan.hasNext()){
String line = scan.nextLine();
for(int i = 0; i < 26; i++){
String now = "";
StringBuffer sb = new StringBuffer();
for(int j = 0; j <... | Main.java:48: error: reached end of file while parsing
}
^
1 error
|
s149974894 | p00017 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
while(scan.hasNext()){
String line = scan.nextLine();
for(int i = 0; i < 26; i++){
String now = "";
StringBuffer sb = new StringBuffer();
for(int j = 0; j <... | Main.java:48: error: reached end of file while parsing
}
^
1 error
|
s448169301 | p00017 | Java | import java.util.*;
public class MainA{
private static final Scanner scan = new Scanner(System.in);
static int dd = 0;
public static void main(String[] args){
String theS = "the";
String thisS = "this";
String thatS = "that";
String[] theZ = changeCip(theS);
String[] thisZ = changeCip(thisS);
String[] ... | Main.java:3: error: class MainA is public, should be declared in a file named MainA.java
public class MainA{
^
1 error
|
s038154315 | p00017 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
while(scan.hasNext()){
String cipLine = scan.nextLine();
for(int i = 0; i < 26; i++){
StringBuffer sb = new StringBuffer();
for(int j = 0; j < cipLine.length(... | Main.java:29: error: cannot find symbol
char cs = now.chatAt(j);
^
symbol: method chatAt(int)
location: variable now of type String
Main.java:39: error: cannot find symbol
char cs2 = now.chatAt(j + 2);
^
symbol: method chatAt(int)
location: variable now of ... |
s448651904 | p00017 | Java | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
while(scan.hasNext()){
String cipLine = scan.nextLine();
for(int i = 0; i < 26; i++){
StringBuffer sb = new StringBuffer();
for(int j = 0; j < cipLine.length(... | Main.java:46: error: incompatible types: int cannot be converted to boolean
for(int j = 0; now.length() - 3; j++){
^
1 error
|
s772801463 | p00017 | Java | import java.util.*;
public class Vol0_17aa{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
while(scan.hasNext()){
String cipLine = scan.nextLine();
for(int i = 0; i < 26; i++){
StringBuffer sb = new StringBuffer();
for(int j = 0; j < cipLine.le... | Main.java:3: error: class Vol0_17aa is public, should be declared in a file named Vol0_17aa.java
public class Vol0_17aa{
^
1 error
|
s361855477 | p00017 | Java | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String text = sc.next();
String retext = "";
for(int i=0; i<28; i++){
retext = retext+String.valueof((char)(text.charAt(... | Main.java:10: error: cannot find symbol
retext = retext+String.valueof((char)(text.charAt(i) -no));
^
symbol: variable no
location: class Main
Main.java:10: error: cannot find symbol
retext = retext+String.valueof((char)(text.charAt(... |
s481249287 | p00017 | Java | import java.io.*;
public class Aoj0017CaesarCipher {
public static void main(String[] args) throws IOException{
try{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String str;
String target[];
int tmp1 = 99;
... | Main.java:3: error: class Aoj0017CaesarCipher is public, should be declared in a file named Aoj0017CaesarCipher.java
public class Aoj0017CaesarCipher {
^
1 error
|
s890780953 | p00017 | Java | import java.io.*;
public class main{
public static void main(String[] args) throws IOException{
try{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String str;
String target[];
int checkResult = 99;
int ca... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s960886092 | p00017 | Java | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
static char cnvChar[] = {'a','b','c','d','e','f','g','h','i','j','k','l... | Main.java:56: error: bad operand types for binary operator '||'
if (diff[0] = -12 || diff[0] = 15) {
^
first type: int
second type: int
Main.java:56: error: incompatible types: int cannot be converted to boolean
if (diff[0] = -12 || diff[0] = 15) {
^
2 errors
|
s552014761 | p00017 | Java | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
static char cnvChar[] = {'a','b','c','d','e','f','g','h','i','j','k','l... | Main.java:56: error: bad operand types for binary operator '||'
if (diff[0] = -12 || diff[0] = 15) {
^
first type: int
second type: int
Main.java:56: error: incompatible types: int cannot be converted to boolean
if (diff[0] = -12 || diff[0] = 15) {
^
2 errors
|
s769032082 | p00017 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Pattern;
public class Test{
public static void main(String[] args){
Pattern pattern = Pattern.compile("this|that|the");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
St... | Main.java:6: error: class Test is public, should be declared in a file named Test.java
public class Test{
^
1 error
|
s445086495 | p00017 | Java | <?php
$kw = array('the', 'this', 'that');
while (TRUE) {
$s = rtrim(fgets(STDIN));
if (feof(STDIN)) {
break;
}
for ($i = 0; $i < 26; $i++) {
$words = explode(' ', str_replace('.', '', $s));
foreach ($kw as $v) {
if (in_array($v, $words)) {
echo $s . P... | Main.java:1: error: class, interface, enum, or record expected
<?php
^
Main.java:3: error: unclosed character literal
$kw = array('the', 'this', 'that');
^
Main.java:3: error: unclosed character literal
$kw = array('the', 'this', 'that');
^
Main.java:3: error: unclosed character literal
$kw ... |
s063474869 | p00017 | Java | import java.io.*;
import java.util.Scanner;
public class CaesarChipher {
public static String decode (String str) {
String ret = "";
for (int i = 1; i <= 25; i++) {
boolean flag = false;
for (String s : str.split(" ")) {
if (s.charAt(s.length() - 1) == '.')
s = s.substring(0,s.length() - 1)... | Main.java:4: error: class CaesarChipher is public, should be declared in a file named CaesarChipher.java
public class CaesarChipher {
^
1 error
|
s756878151 | p00017 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Pattern;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Pattern ptr = Pattern.compile("this... | Main.java:27: error: reached end of file while parsing
}
^
1 error
|
s096621006 | p00017 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Pattern;
public class CaesarChipher {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Pattern ptr = Pattern.com... | Main.java:7: error: class CaesarChipher is public, should be declared in a file named CaesarChipher.java
public class CaesarChipher {
^
1 error
|
s487148469 | p00017 | Java | import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner scanner = new Scanner(System.in);
ArrayList<String> strlist = new ArrayList<String>();
while (scanner.hasNext()) {
strlist.add(scanner.next());
}
... | Main.java:17: error: cannot find symbol
System.out.printa(decoded);
^
symbol: method printa(StringBuilder)
location: variable out of type PrintStream
1 error
|
s308078340 | p00017 | C | #include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int i;
char s[80];
while(gets(s)!=EOF){
for(i=0;i<=79;i++){
if(s[i]=='\0'){
break;
}
if(isalpha(s[i])!=false){
s[i]-=4;
}
}
puts(s);
return 0;
}
}
| main.c: In function 'main':
main.c:9:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
9 | while(gets(s)!=EOF){
| ^~~~
| fgets
main.c:14:35: error: 'false' undeclared (first use in this function)
14 | ... |
s713208216 | p00017 | C | #include <stdio.h>
#include <string.h>
#include <math.h>
//#define DEBUG 1
#define LENGTH 81
char shift_char(char in);
main()
{
char input[LENGTH];
int flag = 1;
gets(input);
int i, j;
while(gets(input) != \0)
{
while(1)
{
if(strstr(input, "the") != NULL || strstr(input, "that") != NULL || strstr(input,... | main.c:10:1: error: return type defaults to 'int' [-Wimplicit-int]
10 | main()
| ^~~~
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
14 | gets(input);
| ^~~~
| fgets
main.c:1... |
s214524285 | p00017 | C | #include<string.h>
int main(void){
int i, j, flag, offset;
int lenstr;
char str[100];
for(i = 0 ; i < 100; i++){
str[i] = 0;
}
while(fgets(str, 100, stdin) != NULL){
lenstr = strlen(str);
flag = 0;
for(i = 0; i < lenstr; i++){
if(str[i]... | main.c: In function 'main':
main.c:13:11: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
13 | while(fgets(str, 100, stdin) != NULL){
| ^~~~~
main.c:13:27: error: 'stdin' undeclared (first use in this function)
13 | while(fgets(str, 100, stdin) != NULL){
... |
s835437772 | p00017 | C | #include<stdio.h>
int main(){
int n,i,j,flag,t;
char s[81],ans[81],tmp[81];
scanf("%s",s);
for(i=0,n=0,flag=0;i<26;i++){
for(j=0;s[j]!='\0';j++){
if(!('a'<=s[j]&&s[j]<='z')){
if(tmp[0]=='t'&&tmp[1]=='h'
&&((tmp[2]=='e'&&n==3)
||(tmp[2]=='i'&&tmp[3]=='s'&&n==4... | main.c: In function 'main':
main.c:19:49: error: 'tnp' undeclared (first use in this function); did you mean 'tmp'?
19 | ||(tmp[2]=='a'&&tnp[3]=='t'&&n==4))){
| ^~~
| tmp
main.c... |
s101568926 | p00017 | C | #include<stdio.h>
int main(){
int n,i,j,flag,t;
char s[81],ans[81],tmp[81];
scanf("%s",s);
for(i=0,n=0,flag=0;i<26;i++){
for(j=0;s[j]!='\0';j++){
if(!('a'<=s[j]&&s[j]<='z')){
if(tmp[0]=='t'&&tmp[1]=='h'
&&((tmp[2]=='e'&&n==3)
||(tmp[2]=='i'&&tmp[3]=='s'&&n==4... | main.c: In function 'main':
main.c:54:1: error: expected declaration or statement at end of input
54 | }
| ^
|
s585991323 | p00017 | C | w#include <stdio.h>
#include <string.h>
int main(){
int i,j;
char s[80];
int len;
while(gets(s)){
len=strlen(s);
for(i=0;i<26;i++){
for(j=0;j<len;j++){
if(s[j]!=' ' && s[j]!='.'){
if(s[j]=='z')s[j]='a';
else s[j]++;
}
}
for(j=0;j<len-4;j++){
if(s[j]=='t' && s[j+1]=='h'... | main.c:1:2: error: stray '#' in program
1 | w#include <stdio.h>
| ^
main.c:1:1: error: unknown type name 'w'
1 | w#include <stdio.h>
| ^
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | w#include <stdio.h>
| ^
In file included from main.c... |
s932175506 | p00017 | C | #include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
char a[85],i;
while(gets(a)!=NULL)
{
for(i=0;a[i]!='\0';i++)
{
if(a[i]>=101&&a[i]<=123)
a[i]=a[i]-4;
else if(a[i]<=100&&a[i]>=97)
a[i]=a[i]+23;
else
... | main.c: In function 'main':
main.c:9:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
9 | while(gets(a)!=NULL)
| ^~~~
| fgets
main.c:9:18: warning: comparison between pointer and integer
9 | while(gets(a)!=NULL)
... |
s097765197 | p00017 | C |
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
char s[128];
int i,j,k;
int c;
while((gets(s))!=NULL){
c=1;
for(i=0;i<26;i++){
for(j=0;j<strlen(s);j++){
if(isalpha(s[j])){
if(s[j]=='z'){
s[j]='a'... | main.c: In function 'main':
main.c:10:12: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
10 | while((gets(s))!=NULL){
| ^~~~
| fgets
main.c:10:20: warning: comparison between pointer and integer
10 | while((gets(s))... |
s382512658 | p00017 | C | #include<stdio.h>
#include<string.h>
int main()
{
char s[81];
int i;
while(gets(s)){
for(i=0; i<strlen(s); i++){
if(s[i]>='a' && s[i]<='z')
s[i]-=4;
}
puts(s);
}
return 0;
}
| main.c: In function 'main':
main.c:8:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
8 | while(gets(s)){
| ^~~~
| fgets
|
s442201160 | p00017 | C |
#include <stdio.h>
#include<string.h>
int main()
{
char a[200];
int i,b,x,l,c,in;
while(gets(a)!=EOF)
{
l=strlen(a);
b=(int)a[0];
x=116-b;
for(i=0;i<l;i++)
{
if(a[i]>=97&&a[i]<=122)
{
in=(int)a[i];
a[i]=in... | main.c: In function 'main':
main.c:8:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
8 | while(gets(a)!=EOF)
| ^~~~
| fgets
|
s317836858 | p00017 | C |
#include <stdio.h>
#include<string.h>
int main()
{
char a[200];
int i,b,x,l,c,in;
while(gets(a)!=EOF)
{
l=strlen(a);
b=(int)a[0];
x=116-b;
for(i=0;i<l;i++)
{
if(a[i]>=97&&a[i]<=122)
{
in=(int)a[i];
a[i]=in... | main.c: In function 'main':
main.c:8:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
8 | while(gets(a)!=EOF)
| ^~~~
| fgets
|
s267530201 | p00017 | C | #include<stdio.h>
#include<string.h>
int main()
{
int i,l;
char ch[90];
while(gets(ch)){
l=strlen(ch);
for(i=0;i<l;i++){
if(ch[i]>='a'&&ch[i]<='z'){
if(ch[i]=='a'||ch[i]=='b'||ch[i]=='c'||ch[i]=='d'){
if(ch[i]=='a'){
ch[i]='w';
}
else if(ch[i]=='b'){
ch[i]='x';
}
else if(ch[i]=='c'){
ch[i]='y';
}
else if(ch[i]=='d... | main.c: In function 'main':
main.c:7:7: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
7 | while(gets(ch)){
| ^~~~
| fgets
|
s569442574 | p00017 | C | #include<stdio.h>
#include<string.h>
int main(void){
char x[100];
int i;
while(scanf("%[a-z .]", x)!=EOF){
getchar();
while(1){
if(strstr(x, " the ")!=NULL || trstr(x, " this ")!=NULL || trstr(x, " that ")!=NULL){
break;
}
for(i=0; i<strlen(x)-1; i++){
if(x[i]==' ')i++;
... | main.c: In function 'main':
main.c:15:38: error: implicit declaration of function 'trstr'; did you mean 'strstr'? [-Wimplicit-function-declaration]
15 | if(strstr(x, " the ")!=NULL || trstr(x, " this ")!=NULL || trstr(x, " that ")!=NULL){
| ^~~~~
| ... |
s240024771 | p00017 | C | #include<stdio.h>
#include<string.h>
int main(void){
char x[100];
int i;
while(gets(x)!=NULL){
while(1){
if(strstr(x, " the ")!=NULL || strstr(x, " this ")!=NULL || strstr(x, " that ")!=NULL){
break;
}
for(i=0; i<strlen(x)-1; i++){
if(x[i]==' ')i++;
x[i]++;
if(x[i]>'z')... | main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
11 | while(gets(x)!=NULL){
| ^~~~
| fgets
main.c:11:16: warning: comparison between pointer and integer
11 | while(gets(x)!=NULL){
... |
s337394277 | p00017 | C | #include<stdio.h>
#include<string.h>
int main(void){
char x[100];
int i;
while(gets(x)!=NULL){
while(1){
if(strstr(x, " the ")!=NULL || strstr(x, " this ")!=NULL || strstr(x, " that ")!=NULL){
break;
}
for(i=0; i<strlen(x); i++){
if(x[i]!=' ' && x[i]!='.'){
x[i]++;
}
... | main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
11 | while(gets(x)!=NULL){
| ^~~~
| fgets
main.c:11:16: warning: comparison between pointer and integer
11 | while(gets(x)!=NULL){
... |
s919571725 | p00017 | C | #include<stdio.h>
#include<string.h>
int main(void){
char x[100];
int i;
while(gets(x)!=NULL){
while(1){
if(strstr(x, "the")==NULL && strstr(x, "this")==NULL && strstr(x, "that")==NULL){
for(i=0; i<strlen(x); i++){
if(x[i]!=' ' && x[i]!='.'){
x[i]++;
}
if(x[i]>'z') x[i]='a';
... | main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
11 | while(gets(x)!=NULL){
| ^~~~
| fgets
main.c:11:16: warning: comparison between pointer and integer
11 | while(gets(x)!=NULL){
... |
s545180075 | p00017 | C | #include<stdio.h>
#include<string.h>
int main(void){
char x[100];
int i;
while(scanf("%s", x)!=EOF){
getchar(x);
while(1){
if(strstr(x, "the")==NULL && strstr(x, "this")==NULL && strstr(x, "that")==NULL){
for(i=0; i<strlen(x); i++){
if(x[i]!=' ' && x[i]!='.'){
x[i]++;
}
if... | main.c: In function 'main':
main.c:12:5: error: too many arguments to function 'getchar'
12 | getchar(x);
| ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: declared here
582 | extern int getchar (void);
| ^~~~~~~
|
s306424384 | p00017 | C | #include<stdio.h>
#include<string.h>
void Roll(char ch[], int times) {
int cnt = 0;
while (ch[cnt] != 0) {
if (96 < ch[cnt] && 123 > ch[cnt])
ch[cnt] = (ch[cnt] - 97 + times) % 26 + 97;
cnt++;
}
}
int main() {
char inp[100]; char buff[80];
int pos = 0, bpos = 0;
while (1) {
if (gets_s(inp, 100) == N... | main.c: In function 'main':
main.c:20:21: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
20 | if (gets_s(inp, 100) == NULL)break;
| ^~~~~~
main.c:20:38: warning: comparison between pointer and integer
20 | if (gets_s(inp... |
s465480999 | p00017 | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
void Roll(char ch[], int times) {
int cnt = 0;
while (ch[cnt] != 0) {
if (96 < ch[cnt] && 123 > ch[cnt])
ch[cnt] = (ch[cnt] - 97 + times) % 26 + 97;
cnt++;
}
}
int main() {
char inp[100]; char buff[80];
int pos = 0, bpos = 0;
while (1) {
if (ge... | main.c: In function 'main':
main.c:21:21: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
21 | if (gets_s(inp, 100) == NULL)break;
| ^~~~~~
main.c:21:38: warning: comparison between pointer and integer
21 | if (gets_s(inp... |
s870430633 | p00017 | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
void Roll(char ch[], int times) {
int cnt = 0;
while (ch[cnt] != 0) {
if (96 < ch[cnt] && 123 > ch[cnt])
ch[cnt] = (ch[cnt] - 97 + times) % 26 + 97;
cnt++;
}
}
int main() {
char inp[100]; char buff[80];
int pos = 0, bpos = 0;
while (1) {
if (ge... | main.c: In function 'main':
main.c:21:21: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
21 | if (gets(inp) == NULL)break;
| ^~~~
| fgets
main.c:21:31: warning: comparison between pointer and ... |
s554431438 | p00017 | C | #include "stdio.h"
#include "string.h"
int main(void)
{
char input[32]={0};
char strBuff[20][32]={0};
char length[20]={0};
int i,j,len,front,ret;
int strCnt=20;
int pt;
int pt2;
// Input
for(i = 0; i < 20; i++)
{
ret = scanf("%s", &strBuff[i]);
if(ret > 0)
{
length[i] = strlen(input);
}
else
... | main.c: In function 'main':
main.c:35:28: error: assignment to 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
35 | pt = strBuff[0] - 20;
| ^
main.c:58:26: error: expected ';' before '{' token
58 | while(j < strCnt)
... |
s272613744 | p00017 | C | #include <stdio.h>
#include <string.h>
char Chipher(char c,int n){
return c+n <= 122 ? c+n : c+n-25;
}
int main(){
char a[85],b[85];
while(gets(a) != EOF){
int i,j,flag;
flag = 0;
for(i=0;i<26;i++){
for(j=0;j<strlen(a);j++){
if(a[j] == ' ' || a[j] == '.'){ b[j] = a[j];}
else {... | main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
11 | while(gets(a) != EOF){
| ^~~~
| fgets
|
s416543912 | p00017 | C |
#include <stdio.h>
#include <string.h>
char Chipher(char c,int n){
return c+n <= 122 ? c+n : c+n-25;
}
int main(){
char a[85],b[85];
while(gets(a) != EOF){
int i,j,flag;
flag = 0;
for(i=0;i<26;i++){
for(j=0;j <= strlen(a);j++){
if(a[j] == ' ' || a[j] == '.' || a[j] == '\0'){ ... | main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
13 | while(gets(a) != EOF){
| ^~~~
| fgets
|
s055595426 | p00017 | C |
#include <stdio.h>
#include <string.h>
char Chipher(char c,int n){
return c-n >= 97 ? c-n : 123-(97-(c-n));
}
int main(){
char a[85],b[85];
while(gets(a) != EOF){
int i,j,flag;
flag = 0;
for(i=0;i<26;i++){
for(j=0;j <= strlen(a);j++){
if(a[j] == ' ' || a[j] == '.' || a[j] == ... | main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
13 | while(gets(a) != EOF){
| ^~~~
| fgets
|
s553136627 | p00017 | C |
#include <stdio.h>
#include <string.h>
char Chipher(char c,int n){
return c-n >= 97 ? c-n : 123-(97-(c-n));
}
int main(){
char a[85],b[85];
while(gets(a) != EOF){
int i,j,flag;
flag = 0;
for(i=0;i<26;i++){
for(j=0;j <= strlen(a);j++){
if(a[j] == ' ' || a[j] == '.' || a[j] == ... | main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
13 | while(gets(a) != EOF){
| ^~~~
| fgets
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.