submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s858532012
p03836
C++
import java.util.*; public class Main{ public static void main(String[]args){ Scanner sc = new Scanner(System.in); String[] S = sc.nextLine().split(" "); int sx = Integer.parseInt(S[0]); int sy = Integer.parseInt(S[1]); int tx = Integer.parseInt(S[2]); int ty = Integer.parseInt(S[3]); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s277379183
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> #include <vector> bool is_in_indices(int a, int b, std::unordered_set<std::string>* indices) { char key[6]; sprintf(key, "%d_%d", a, b); return indices->count(std::string(key)) > 0; } void walk(int cx, int tx, int cy, int ty, std::unordered_set<s...
a.cc: In function 'int main()': a.cc:77:14: error: expected ';' before '&' token 77 | for (auto p&: result) { | ^ | ; a.cc:77:15: error: expected primary-expression before ':' token 77 | for (auto p&: result) { | ^ a.cc:77:15: error: expected ';' befor...
s546945434
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> #include <vector> bool is_in_indices(int a, int b, std::unordered_set<std::string>* indices) { char key[6]; sprintf(key, "%d_%d", a, b); return indices->count(std::string(key)) > 0; } void walk(int cx, int tx, int cy, int ty, std::unordered_set<s...
a.cc: In function 'void walk(int, int, int, int, std::unordered_set<std::__cxx11::basic_string<char> >*, std::vector<std::__cxx11::basic_string<char> >*)': a.cc:35:25: error: expected ')' before 'cy' 35 | if (is_in_indices(cx cy - 1, indices)) { | ~ ^~~ | ...
s631275398
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> #include <vector> bool is_in_indices(int a, int b, std::unordered_set<std::string>* indices) { char key[6]; sprintf(key, "%d_%d", a, b); return indices->count(std::string(key)) > 0; } void walk(int cx, int tx, int cy, int ty, std::unordered_set<s...
a.cc: In function 'void walk(int, int, int, int, std::unordered_set<std::__cxx11::basic_string<char> >*, std::vector<std::__cxx11::basic_string<char> >*)': a.cc:35:25: error: expected ')' before 'cy' 35 | if (is_in_indices(cx cy - 1, indices)) { | ~ ^~~ | ...
s063304977
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> bool is_in_indices(int a, int b, std::unordered_set<std::string>* indices) { char key[6]; sprintf(key, "%d_%d", a, b); return indices->count(std::string(key)) > 0; } void walk(int cx, int tx, int cy, int ty, std::unordered_set<std::string>* indic...
a.cc:11:85: error: 'std::vector' has not been declared 11 | void walk(int cx, int tx, int cy, int ty, std::unordered_set<std::string>* indices, std::vector<std::string>* result) { | ^~~ a.cc:11:96: error: expected ',' or '...' ...
s782734479
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> bool is_in_indices(int a, int b, std::unordered_set<int>* indices) { char key[6]; sprintf(key, "%d_%d", a, b); return indices->count(std::string(key)) > 0; } void walk(int cx, int tx, int cy, int ty, std::unordered_set<std::string>* indices, std:...
a.cc: In function 'bool is_in_indices(int, int, std::unordered_set<int>*)': a.cc:8:30: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::unordered_set<int>::key_type&' {aka 'const int&'} 8 | return indices->count(std::string(key)) > 0; | ...
s750298668
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> bool is_in_indices(int a, int b, std::unordered_set<int>* indices) { char key[6]; sprintf(key, "%d_%d", a, b); return indices->count(std::string(key) > 0; } void walk(int cx, int tx, int cy, int ty, std::unordered_set<std::string>* indices, std::...
a.cc: In function 'bool is_in_indices(int, int, std::unordered_set<int>*)': a.cc:8:42: error: no match for 'operator>' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 8 | return indices->count(std::string(key) > 0; | ~~~~~~~~~~~ ^ ~ | ...
s555932551
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> bool check_indices(int a, int b, std::unordered_set<int>* indices) { char key[6]; sprintf(key, "%d_%d", a, b); return !indices->contains(std::string(key))); } void walk(int cx, int tx, int cy, int ty, std::unordered_set<std::string>* indices, std...
a.cc: In function 'bool check_indices(int, int, std::unordered_set<int>*)': a.cc:8:20: error: 'class std::unordered_set<int>' has no member named 'contains' 8 | return !indices->contains(std::string(key))); | ^~~~~~~~ a.cc:8:46: error: expected ';' before ')' token 8 | return !indic...
s221918870
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> bool check_indices(int a, int b, std::unordered_set<int>* indices) { const char key[6]; sprintf(key, "%d_%d", a, b); return !indices->contains(std::string(key))); } void walk(int cx, int tx, int cy, int ty, std::unordered_set<std::string>* indice...
a.cc: In function 'bool check_indices(int, int, std::unordered_set<int>*)': a.cc:6:14: error: uninitialized 'const key' [-fpermissive] 6 | const char key[6]; | ^~~ a.cc:7:11: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] 7 | sprintf(key, "%d_%d", a, b); | ...
s063984086
p03836
C++
#include <unordered_set> #include <iostream> #include <algorithm> bool check_indices(int a, int b, std::unordered_set<int> indices) { const char[6] key; sprintf(key, "%d_%d", a, b); return !indices->contains(std::string(key))); } void walk(int cx, int tx, int cy, int ty, std::unordered_set<std::string>* indices...
a.cc: In function 'bool check_indices(int, int, std::unordered_set<int>)': a.cc:6:14: error: expected identifier before numeric constant 6 | const char[6] key; | ^ a.cc:6:14: error: expected ']' before numeric constant 6 | const char[6] key; | ^ | ] a...
s101702856
p03836
C++
#include<iostream> #include<vector> #include<map> #include<string> #include<cstring> #include<bitset> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<cstdio> #include<numeric> #include<set> #include<math.h> #include<unordered_map> using namespace std; #define rep(i,x) for(int i=0;i<x;i++) ...
a.cc: In function 'int main()': a.cc:31:31: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(bool)' 31 | cout<<'L'<<string(dy+1<'U')<<string(dx+1,'R')<<endl; | ^ In file included from /usr/include/c++/14/string:54, from /...
s327366657
p03836
C++
#include<iostream> #include<vector> #include<map> #include<string> #include<cstring> #include<bitset> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<cstdio> #include<numeric> #include<set> #include<math.h> #include<unordered_map> using namespace std; const int dx[4]={1,0,-1,0}; const int ...
a.cc: In function 'int main()': a.cc:32:40: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(const int [4], char)' 32 | cout<<string(dy,'U')<<string(dx,'R'); | ^ In file included from /usr/include/c++/14/string:54, ...
s126122649
p03836
C++
#include <iostream> # include <string> # include <cstdio> using namespace std; int main(void) { int sx, sy, tx, ty; int a[10]; for (int i = 0; i< 4; i++){ scanf("%d", &a[i]); } sx = a[0]; sy = a[1]; tx = a[2]; ty = a[3]; int x_diff = tx- sx; int y_diff = ty - sy; string box1 = string...
a.cc: In function 'int main()': a.cc:20:37: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&, const char [2])' 20 | string box1 = string(y_diff, "U"); | ^ In file included from /usr/include/c++/14/string:54, fr...
s009979604
p03836
C++
#include <iostream> # include <string> # include <cstdio> using namespace std; int main(void) { int sx, sy, tx, ty; int a[10]; for (int i = 0; i< 4; i++){ scanf("%d", &a[i]); } sx = a[0]; sy = a[1]; tx = a[2]; ty = a[3]; string box1, box2; int x_diff = tx- sx; int y_diff = ty - sy; ...
a.cc: In function 'int main()': a.cc:20:30: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&, const char [2])' 20 | box1 = string(y_diff, "U"); | ^ In file included from /usr/include/c++/14/string:54, from /usr/includ...
s101917934
p03836
C++
#include <iostream> # include <string> int main(void) { int sx, sy, tx, ty; cin >> sx >> endl; cin >> sy >> endl; cin >> tx >> endl; cin >> ty >> endl; string box1, box2; int x_diff = tx- sx; int y_diff = ty - sy; box1 = string(y_diff, "U"); box1 += string(x_diff+1, "R"); box1 += string(y...
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> sx >> endl; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Link...
s630474886
p03836
C++
#include <iostream> # include <string> int main(void) { int sx, sy, tx, ty; cin >> sx<< endl; cin >> sy<< endl; cin >> tx<< endl; cin >> ty<< endl; string box1, box2; int x_diff = tx- sx; int y_diff = ty - sy; box1 = string(y_diff, "U"); box1 += string(x_diff+1, "R"); box1 += string(y_dif...
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> sx<< endl; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linke...
s529002428
p03836
C++
#include <iostream> # include <string> int main(void) { int sx, sy, tx, ty; cin >> sx, sy, tx, ty << endl; string box1, box2; int x_diff = tx- sx; int y_diff = ty - sy; box1 = string(y_diff, "U"); box1 += string(x_diff+1, "R"); box1 += string(y_diff+1, "D"); box1 += string(x_diff+1, "L"); ...
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> sx, sy, tx, ty << endl; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s970707520
p03836
C++
#include <iostream> # include <string> int main(void) { int sx; sy; tx; ty; cin >> sx, sy, tx, ty << endl; string box1, box2; int x_diff = tx- sx; int y_diff = ty - sy; box1 = string(y_diff, "U"); box1 += string(x_diff+1, "R"); box1 += string(y_diff+1, "D"); box1 += string(x_diff+1, "L"); ...
a.cc: In function 'int main()': a.cc:4:11: error: 'sy' was not declared in this scope; did you mean 'sx'? 4 | int sx; sy; tx; ty; | ^~ | sx a.cc:4:15: error: 'tx' was not declared in this scope; did you mean 'sx'? 4 | int sx; sy; tx; ty; | ^~ | ...
s519756885
p03836
Java
public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int sx = sc.nextInt(); int sy = sc.nextInt(); int tx = sc.nextInt(); int ty = sc.nextInt(); StringBuilder res = new StringBuilder(""); for(int i = 0; i < ty - sy; ...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s355726663
p03836
C++
#include <bits/stdc++.h> #include <algorithm> using namespace std; int main() { long long int a,b,c,d,e,f,g[110],h[110]; cin >>a >>b>>c>>d; { if( d-b>0){ for(int i=0;i<d-b;i++){ cout << "U" ; } } else if(d-b<0){ for(int i=0;i<b-d;i++){ cout <<"D"; } } } ...
a.cc:134:3: error: expected unqualified-id before '{' token 134 | { | ^ a.cc:148:5: error: expected unqualified-id before '{' token 148 | { | ^ a.cc:163:1: error: 'cout' does not name a type 163 | cout << endl; | ^~~~ a.cc:164:1: error: expected declaration before '}' token 164 | }...
s326601977
p03836
C++
#include <iostream> #include <vector> #include <cmath> #include <map> char dd[4] = {'U','R','D','L'}; pair<int, int> di = {make_pair(0,1), make_pair(1,0), make_pair(0,-1), make_pair(0,-1)}; using namespace std; vector<char> ans; visit(int sx, int sy, int tx, int ty, vector<vector<bool>> &visited, vector<char> &s){ ...
a.cc:7:1: error: 'pair' does not name a type 7 | pair<int, int> di = {make_pair(0,1), make_pair(1,0), make_pair(0,-1), make_pair(0,-1)}; | ^~~~ a.cc:13:1: error: ISO C++ forbids declaration of 'visit' with no type [-fpermissive] 13 | visit(int sx, int sy, int tx, int ty, vector<vector<bool>> &visited, vect...
s314140663
p03836
C++
#include <bits/stdc++.h> using namespace std; int main(){ int X, Y, x, y; cin >> X >> Y >> x >> y; x -= X; y -= Y; while(int i; i < y; i++) cout << 'U'; while(int i; i < x; i++) cout << 'R'; while(int i; i < y; i++) cout << 'D'; while(int i; i < x; i++) cout << 'L'; cout << ...
a.cc: In function 'int main()': a.cc:11:14: error: expected initializer before ';' token 11 | while(int i; i < y; i++) | ^ a.cc:11:14: error: expected ')' before ';' token 11 | while(int i; i < y; i++) | ~ ^ | ) a.cc:11:16: error: 'i' was not declared in ...
s954937815
p03836
Java
import java.util.Scanner; import java.util.Set; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int sx = Integer.parseInt(sc.next()); int sy = Integer.parseInt(sc.next()); int tx = Integer.parseInt(sc.next()); int ty = Integer...
Main.java:18: error: cannot find symbol Arrays.fill(xway, xdir); ^ symbol: variable Arrays location: class Main Main.java:19: error: cannot find symbol Arrays.fill(yway, ydir); ^ symbol: variable Arrays location: class Main Main.java:22: error: cannot find symbol Arra...
s053723638
p03836
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int sx, sy, tx, ty; int main() { cin >> sx >> sy >> tx >> ty; for (int i = sx; i < tx; i++) { cout << "R"; } for (int i = sy; i < tx; i++) { cout << "U"; } for (int i = tx; i > sx; i--) { cout << "L";...
a.cc: In function 'int main()': a.cc:36:14: error: expected unqualified-id before '=' token 36 | for (int = ty; i >= sy; i--) { | ^ a.cc:36:13: error: expected ';' before '=' token 36 | for (int = ty; i >= sy; i--) { | ^~ | ; a.cc:36:14: error: expect...
s509629275
p03836
Java
import javafx.beans.binding.When; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.*; import java.lang.Math.*; public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.ou...
Main.java:1: error: package javafx.beans.binding does not exist import javafx.beans.binding.When; ^ 1 error
s046364349
p03836
C++
// C - Back and Forth #include <bits/stdc++.h> using namespace std; int main(){ int sx,sy,tx,ty; cin>>sx>>sy>>tx>>ty; int dx = tx-sx; int dy = ty-sy; string s = ""; for(int i=1; i<=dy; i++) s += "U"; for(int i=1; i<=dx; i++) s += "R"; for(int i=1; i<=dy; i++) s += "D"; for(int i=1; i<=dx; i++) s += "L"; dx+...
a.cc: In function 'int main()': a.cc:25:9: error: 'ote' was not declared in this scope 25 | ote(s); | ^~~
s036474921
p03836
C++
#include "bits/stdc++.h" using namespace std; //using Matrix = vector< vector<int> >; typedef long long ll; typedef pair<int, int> P; const int INF = 1e9 + 10; //const ll INF = 1e18 + 10LL; int dx[5] = {0, 0, 1, -1, 0}, dy[5] = {1, -1, 0, 0, 0}; const double EPS = 1e-10; bool cmp(P a, P b) { return a.second < b.secon...
a.cc: In function 'int main()': a.cc:25:41: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(double)' 25 | cout<< 'L' << string(dy + 1. 'U') << string(dx + 1, 'R') << 'D'; | ^ In file included from /usr/include/c++/14/string...
s548387118
p03836
C++
#include <iostream> #include <string> using namespace std; int main(){ int sx, sy, tx, ty; int dx, dy; cin >> sx >> sy >> tx >> ty; dx = tx - sx; dy = ty - sy; cout << string(dy, 'U') << string(dx, 'R') << string(dy, 'D') << string(dx, 'L'); cout << 'L'; cout << string(dy + 1, 'U') << string(dx + 1, 'R') cout...
a.cc: In function 'int main()': a.cc:13:59: error: expected ';' before 'cout' 13 | cout << string(dy + 1, 'U') << string(dx + 1, 'R') | ^ | ; 14 | cout << 'D'; | ...
s841450935
p03836
C++
#include <iostream> #include <string> using namespace std; int main(){ int sx, sy, tx, ty; int dx, dy; cin >> sx >> sy >> tx >> ty; dx = tx - sx; dy = ty - sy; cout << string(dy, 'U') << sring(dx, 'R') << string(dy, 'D') << sring(dx, 'L'); cout << 'L'; cout << string(dy + 1, 'U') << sring(dx + 1, 'R') cout <<...
a.cc: In function 'int main()': a.cc:11:36: error: 'sring' was not declared in this scope 11 | cout << string(dy, 'U') << sring(dx, 'R') << string(dy, 'D') << sring(dx, 'L'); | ^~~~~
s895855764
p03836
C++
#include <iostream> #include <sting> using namespace std; int main(){ int sx, sy, tx, ty; int dx, dy; cin >> sx >> sy >> tx >> ty; dx = tx - sx; dy = ty - sy; cout << string(dy, 'U') << sring(dx, 'R') << string(dy, 'D') << sring(dx, 'L'); cout << 'L'; cout << string(dy + 1, 'U') << sring(dx + 1, 'R') cout << ...
a.cc:2:10: fatal error: sting: No such file or directory 2 | #include <sting> | ^~~~~~~ compilation terminated.
s406444218
p03836
C++
#include <bits/stdc++.h> using namespace std; int main() { int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; for(int i = 0; i < tx - sx; i++){ cout << "R"; } for(int i = 0; i < ty - sy; i++){ cout << "U"; } for(int i = 0; i < tx - sx; i++){ cout << "L"; } for(int i = 0; i < ty - sy; i++){ ...
a.cc: In function 'int main()': a.cc:27:15: error: expected ';' before 'for' 27 | cout << "LU" | ^ | ; 28 | for(int i = 0; i <= tx - sx; i++){ | ~~~ a.cc:28:18: error: 'i' was not declared in this scope 28 | for(int i = 0; i <= tx - sx; i++){ ...
s105056609
p03836
C++
// Created by liszt on 2019/08/04. #include<bits/stdc++.h> using namespace std; int main(){ int sx,sy,tx,ty; cin >>sx >>sy >>tx >>ty; const int dx=tx-sx, dy=ty-sy; cout<<string(dy,"U")<<string(dx,"R"); cout<<string(dy,"D")<<string(dx,"L"); cout<<"L"<<string(dy+1,"U")<<string(dx+...
a.cc: In function 'int main()': a.cc:10:24: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(const int&, const char [2])' 10 | cout<<string(dy,"U")<<string(dx,"R"); | ^ In file included from /usr/include/c++/14/string:54, from /...
s460590505
p03836
C++
#include <iostream> #include <string> #include <algorithm> #include <cstdio> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <numeric> #include <cmath> #include <cassert> using namespace std; typedef long long int ll; typedef pair<int,int> P; #define all(x) x.begin(),x.end(...
a.cc: In function 'int main()': a.cc:67:28: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&, const char [2])' 67 | cout<<string(dx,"R") << string(dy,"U"); | ^ In file included from /usr/include/c++/14/string:54, fr...
s639333779
p03836
C++
#include <iostream> #include <string> #include <algorithm> #include <cstdio> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <numeric> #include <cmath> #include <cassert> using namespace std; typedef long long int ll; typedef pair<int,int> P; #define all(x) x.begin(),x.end(...
a.cc: In function 'int main()': a.cc:66:12: error: incompatible types in assignment of 'int' to 'int [4]' 66 | dx = a-x, dy=b-y | ~~~^~~~~ a.cc:66:21: error: incompatible types in assignment of 'int' to 'int [4]' 66 | dx = a-x, dy=b-y | ~~^~~~
s459552566
p03836
C++
#include <bits/stdc++.h> int main(){ int route[4]; for (int i=0;i<4;i++) cin >> route[i]; const int dx = route[2] - route[0]; const int dy = route[3] - route[1]; cout << string(dx, 'R') << string(dy, 'U'); cout << string(dx, 'L') << string(dy, 'D'); cout << 'D' << string(dx+1, 'R') << string(dy+1, 'U') <...
a.cc: In function 'int main()': a.cc:5:25: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | for (int i=0;i<4;i++) cin >> route[i]; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, ...
s691242896
p03836
C++
#incliude <bits/stdc++.h> int main(){ int route[4]; for (int i=0;i<4;i++) cin >> route[i]; const int dx = route[2] - route[0]; const int dy = route[3] - route[1]; cout << string(dx, 'R') << string(dy, 'U'); cout << string(dx, 'L') << string(dy, 'D'); cout << 'D' << string(dx+1, 'R') << string(dy+1, 'U') ...
a.cc:1:2: error: invalid preprocessing directive #incliude; did you mean #include? 1 | #incliude <bits/stdc++.h> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:5:25: error: 'cin' was not declared in this scope 5 | for (int i=0;i<4;i++) cin >> route[i]; | ...
s356150410
p03836
C++
#include <bits/stdc++.h> using namespace std; string s; int main(){ cin>>s; for(int i=0;i<s.length();i++){ if(i==4||i==13)cout<<' '; else cout<<s[i]; } cout<<endl; } using namespace std; int sx,sy,gx,gy,ans; int main(){ cin>>sx>>sy>>gx>>gy; for (int i=0; i<(gy-sy); i++) { cout<<'U'; ...
a.cc:15:5: error: redefinition of 'int main()' 15 | int main(){ | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | int main(){ | ^~~~
s638900051
p03836
C++
#include <cstdio> #define N 100006 #define fast ios_base::sync_with_stdio(false);cin.tie(NULL); using namespace std; int main() { fast; int x,y,x1,y1,x2,y2; scanf("%d%d%d%d",&x1,&y1,&x2,&y2); x=x1,y=y1; while(x1<x2)x1++,printf("R"); while(y1<y2)y1++,printf("U"); while(x1>x)x1--,printf("L"); while(y1>y)y1--,...
a.cc: In function 'int main()': a.cc:3:14: error: 'ios_base' has not been declared 3 | #define fast ios_base::sync_with_stdio(false);cin.tie(NULL); | ^~~~~~~~ a.cc:8:9: note: in expansion of macro 'fast' 8 | fast; | ^~~~ a.cc:3:47: error: 'cin' was not declared in this s...
s059125995
p03836
Java
import java.io.*; public class Game{ public static void main(String[]args){ BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); System.out.println("select level"); System.out.println("strong weak"); char[][] field; ...
Main.java:25: error: '(' expected switch case(move){ ^ Main.java:25: error: illegal start of expression switch case(move){ ^ Main.java:25: error: : or -> expected switch ca...
s958884021
p03836
C++
int main(void){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; const int dx=tx-sx,dy=ty-sy; // Path 1 cout << string(dy,’U’) << string(dx,’R’); // Path 2 cout << string(dy,’D’) << string(dx,’L’); // Path 3 cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’; // Path 4 cout << ’R’ << string(dy+1,’D’...
a.cc:5:27: error: extended character ’ is not valid in an identifier 5 | cout << string(dy,’U’) << string(dx,’R’); // Path 2 | ^ a.cc:5:27: error: extended character ’ is not valid in an identifier a.cc:5:45: error: extended character ’ is not valid in an identifier 5 | ...
s605090263
p03836
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B,C,D; string S; cin>>A>>B>>C>>D; int E=C-A; int F=D-B; for(int i=0;i<E) cout<<'R'; for(int i=0;i<F) cout<<'U'; for(int i=0;i<E) cout<<'L'; for(int i=0;i<F) cout<<'D'; cout<<'D'; for(int i=0;i<E+1) cout<<'R'; for(i...
a.cc: In function 'int main()': a.cc:10:18: error: expected ';' before ')' token 10 | for(int i=0;i<E) | ^ | ; a.cc:12:18: error: expected ';' before ')' token 12 | for(int i=0;i<F) | ^ | ; a.cc:14:18: error: expected ...
s642456277
p03836
Java
public class Main { public static void main(String[] args) { StringBuilder sb = new StringBuilder(); Scanner in = new Scanner(System.in); int x = in.nextInt(); int y = in.nextInt(); int tx = in.nextInt(); int ty = in.nextInt(); in.close(); int dx = tx - x; int dy = ty - y; for (int i = 0; i ...
Main.java:5: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s860324739
p03836
Java
StringBuilder sb = new StringBuilder(); Scanner in = new Scanner(System.in); int x = in.nextInt(); int y = in.nextInt(); int tx = in.nextInt(); int ty = in.nextInt(); in.close(); int dx = tx - x; int dy = ty - y; for (int i = 0; i < dx; i++) { sb.append("R"); } for (int i = 0; i < dy; i...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. StringBuilder sb = new StringBuilder(); ^ (use --enable-preview to enable unnamed classes) Main.java:7: error: class, interface, enum, or record expected in.close(); ^ Main.java:12: error: class, interface, enum, or record ...
s981448641
p03836
C++
#include <bits/stdc++.h> using namespace std; int main() { int sx, sy, tx, ty; cin>>sx>>sy>>tx>>ty; int x=tx-sx, y=ty-sy; for(int i=0, i<x, i++) { cout<<"U"; } for(int i=0, i<y, i++) { cout<<"R"; } for(int i=0, i<x, i++) { cout<<"D"; } for(int i=0, i<=y, i++) { cout<<"L"; } for(...
a.cc: In function 'int main()': a.cc:8:17: error: expected ';' before '<' token 8 | for(int i=0, i<x, i++) { | ^ | ; a.cc:8:17: error: expected primary-expression before '<' token a.cc:8:24: error: expected ';' before ')' token 8 | for(int i=0, i<x, i++) { |...
s745444441
p03836
C++
#include <bits/stdc++.h> using namespace std; int main() { int sx,sy,tx,ty; cin >> sx >> sy >> tx >>ty; int dx,dy; dx=tx-sx; dy=ty-sy; for(int i=0;i<dx;i++){ cout << "R"; } for(int i=0;i<dy;i++){ cout << "U"; } for(int i=0;i<dx;i++){ cout << "L"; } for(int i=0;i<dy;i++){ cout <...
a.cc: In function 'int main()': a.cc:37:4: error: expected '}' at end of input 37 | ; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s812836273
p03836
C++
#include <bits/stdc++.h> using namespace std; int main() { int sx,sy,tx,ty; cin >> sx >> sy >> tx >>ty; int dx,dy; dx=tx-sx; dy=ty-sy; for(int i=0;i<dx;i++){ cout << "R"; } for(i=0;i<dy;i++){ cout << "U"; } for(i=0;i<dx;i++){ cout << "L"; } for(i=0;i<dy;i++){ cout << "D"; } ...
a.cc: In function 'int main()': a.cc:13:7: error: 'i' was not declared in this scope 13 | for(i=0;i<dy;i++){ | ^ a.cc:16:7: error: 'i' was not declared in this scope 16 | for(i=0;i<dx;i++){ | ^ a.cc:19:7: error: 'i' was not declared in this scope 19 | for(i=0;i<dy;i++){ | ...
s336853211
p03836
C++
#include <bits/stdc++.h> using namespace std; int main() { int sx,sy,tx,ty; cin >> sx >> sy >> tx >>ty; int dx,dy; dx=tx-sx; dy=ty-sy; for(i=0;i<dx;i++){ cout << R; } for(i=0;i<dy;i++){ cout << U; } for(i=0;i<dx;i++){ cout << L; } for(i=0;i<dy;i++){ cout << D; } cout << D; ...
a.cc: In function 'int main()': a.cc:10:7: error: 'i' was not declared in this scope 10 | for(i=0;i<dx;i++){ | ^ a.cc:11:13: error: 'R' was not declared in this scope 11 | cout << R; | ^ a.cc:13:7: error: 'i' was not declared in this scope 13 | for(i=0;i<dy;i++){ | ...
s163535547
p03836
C++
#include "bits/stdc++.h" using namespace std; #include "pch.h" using namespace std; #include <string> #include <iostream> int main() { int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty; int dx = tx - sx; int dy = ty - sy; for (int i = 0; i < dy; i++) putchar('U'); for (int i = 0; i < dx; i++) putchar('R'); for (...
a.cc:3:10: fatal error: pch.h: No such file or directory 3 | #include "pch.h" | ^~~~~~~ compilation terminated.
s027047861
p03836
C++
#include <iostream> using namespace std; int main(){ int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty; int dx = tx - sx; int dy = ty - sy; cout << strig(dx,'R') << strig(dy,'U') << endl; cout << strig(dx,'L') << strig(dy,'D') << endl; cout << 'L' <<strig(dy,'U') << strig(dx,'R') << 'R' << e...
a.cc: In function 'int main()': a.cc:10:13: error: 'strig' was not declared in this scope 10 | cout << strig(dx,'R') << strig(dy,'U') << endl; | ^~~~~
s209725708
p03836
C++
#include <bits/stdc++.h> using namespace std; int main(void){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; const int dx=tx-sx,dy=ty-sy; // Path 1 cout << string(dy,’U’) << string(dx,’R’); // Path 2 cout << string(dy,’D’) << string(dx,’L’); // Path 3 cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’...
a.cc:10:20: error: extended character ’ is not valid in an identifier 10 | cout << string(dy,’U’) << string(dx,’R’); | ^ a.cc:10:20: error: extended character ’ is not valid in an identifier a.cc:10:38: error: extended character ’ is not valid in an identifier 10 | cout << string(dy,’U’...
s252812216
p03836
C
#include <bits/stdc++.h> using namespace std; int main(void){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; const int dx=tx-sx,dy=ty-sy; // Path 1 cout << string(dy,’U’) << string(dx,’R’); // Path 2 cout << string(dy,’D’) << string(dx,’L’); // Path 3 cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s205501580
p03836
C
int main(void){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; const int dx=tx-sx,dy=ty-sy; // Path 1 cout << string(dy,’U’) << string(dx,’R’); // Path 2 cout << string(dy,’D’) << string(dx,’L’); // Path 3 cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’; // Path 4 cout << ’R’ << string(dy+1,’...
main.c: In function 'main': main.c:3:2: error: 'cin' undeclared (first use in this function) 3 | cin >> sx >> sy >> tx >> ty; | ^~~ main.c:3:2: note: each undeclared identifier is reported only once for each function it appears in main.c:8:2: error: 'cout' undeclared (first use in this function) 8 | co...
s353566851
p03836
C++
int main(void){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; const int dx=tx-sx,dy=ty-sy; // Path 1 cout << string(dy,’U’) << string(dx,’R’); // Path 2 cout << string(dy,’D’) << string(dx,’L’); // Path 3 cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’; // Path 4 cout << ’R’ << string(dy+1,’...
a.cc:8:20: error: extended character ’ is not valid in an identifier 8 | cout << string(dy,’U’) << string(dx,’R’); | ^ a.cc:8:20: error: extended character ’ is not valid in an identifier a.cc:8:38: error: extended character ’ is not valid in an identifier 8 | cout << string(dy,’U’) <...
s610126946
p03836
C++
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds; //find_by_order gives kth-largest element //order_of_key gives the number of items in the set that are s...
a.cc: In function 'int32_t main()': a.cc:69:42: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(std::ios_base& (&)(std::ios_base&), char)' 69 | string sec(right,'R'), third(left,'L'); | ^ In file included from /usr/include/c++...
s573885752
p03836
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) int main(){ int sx,sy,ts,ty; cin>>sx>>sy>>tx>>ty; rep(i,ty-sy){ cout<<'U'; } rep(i,tx-sx){ cout<<'R'; } rep(i,ty-sy){ cout<<'D'; } rep(i,tx-sx+1){ cout<<'L'; } rep(i,ty-sy+1){ cout<<'U'; } r...
a.cc: In function 'int main()': a.cc:6:16: error: 'tx' was not declared in this scope; did you mean 'ty'? 6 | cin>>sx>>sy>>tx>>ty; | ^~ | ty
s606886284
p03836
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner kbd = new Scanner(System.in); int sx = kbd.nextInt(); int sy = kbd.nextInt(); int tx = kbd.nextInt(); int ty = kbd.nextInt(); int[] s = { sx, sy }; int[] t = { tx, ty }; ...
Main.java:26: error: cannot find symbol move(t2, x2); ^ symbol: variable x2 location: class Main Main.java:27: error: cannot find symbol move(x2, x); ^ symbol: variable x2 location: class Main Main.java:27: error: cannot find symbol move(x2, x); ...
s794820503
p03836
Java
import java.util.*; public class BackAndForth { public static void main(String[] args) { Scanner kbd = new Scanner(System.in); int sx = kbd.nextInt(); int sy = kbd.nextInt(); int tx = kbd.nextInt(); int ty = kbd.nextInt(); int[] s = { sx, sy }; int[] t = { tx...
Main.java:3: error: class BackAndForth is public, should be declared in a file named BackAndForth.java public class BackAndForth { ^ 1 error
s459618073
p03836
C++
#include<iostream> #include<algorithm> #include<cmath> #include<vector> #include<string> #include<queue> #include<set> #include<map> using namespace std; typedef long long int ll; typedef vector<pair<ll,ll> > Q; typedef pair<int,int> P; #define rep(i,n) for(int i=0;i<(int)(n);i++) int main() { int sx,sy,tx,ty; cin...
a.cc: In function 'int main()': a.cc:36:14: error: expected '}' at end of input 36 | cout<<endl; | ^ a.cc:16:1: note: to match this '{' 16 | { | ^
s459280912
p03836
C++
#include <iostream> using namespace std; int main(void) { int sx, sy, gx, gy, i; scanf_s("%d%d%d%d", &sx, &sy, &gx, &gy); for (i = sy; i < gy; i++) printf("U"); for (i = sx; i < gx; i++) printf("R"); for (i = sy; i < gy; i++) printf("D"); for (i = sx; i <= gx; i++) printf("L"); for (i = sy; i <= gy; i+...
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d%d%d%d", &sx, &sy, &gx, &gy); | ^~~~~~~ | scanf
s364203846
p03836
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int sx,sy,tx,ty,x,y; cin >> sx >> sy >> tx >> ty; x=sx;y=sy; while(y < ty){ cout << 'U'; y++; } while(x<tx){ cout << 'R'; x++; } while(sy<y){ cout << 'D'; y--;...
a.cc: In function 'int main()': a.cc:41:25: error: 'L' was not declared in this scope 41 | cout << string(x-sx,L); | ^
s379847952
p03836
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int sx,sy,tx,ty,x,y; cin >> sx >> sy >> tx >> ty; x=sx;y=sy; while(y < ty){ cout << 'U'; y++; } while(x<tx){ cout << 'R'; x++; } while(sy<y){ cout << 'D'; y--;...
a.cc: In function 'int main()': a.cc:41:25: error: 'L' was not declared in this scope 41 | cout << string(x-sx,L); | ^ a.cc: At global scope: a.cc:43:5: error: 'y' does not name a type 43 | y++;cout << 'U'<<endl; | ^ a.cc:43:9: error: 'cout' does not name a type ...
s111442060
p03836
C++
#include<iostream> using namespace std; int main(){ int sx,sy,tx,ty; cin>>sx>>sy>>tx>>ty; const int dx=tx-sx,dy=ty-sy; // Path 1 cout << string(dy,"U") << string(dx,"R"); // Path 2 cout << string(dy,"D") << string(dx,"L"); // Path 3 cout << "L" << string(dy+1,"U") << string(dx+1,"R") << "D"; // Path 4 c...
a.cc: In function 'int main()': a.cc:10:22: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(const int&, const char [2])' 10 | cout << string(dy,"U") << string(dx,"R"); | ^ In file included from /usr/include/c++/14/string:54, from /us...
s981482132
p03836
C++
#include<iostream> using namespace std; int main(){ int sx,sy,tx,ty; cin>>sx>>sy>>tx>>ty; const int dx=tx-sx,dy=ty-sy; // Path 1 cout << string(dy,"U") << string(dx,"R"); // Path 2 cout << string(dy,"D") << string(dx,"L"); // Path 3 cout << "L" << string(dy+1,"U") << string(dx+1,"R") << "D"; // Path 4 c...
a.cc: In function 'int main()': a.cc:10:22: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(const int&, const char [2])' 10 | cout << string(dy,"U") << string(dx,"R"); | ^ In file included from /usr/include/c++/14/string:54, from /us...
s690869711
p03836
C++
#include<iostream> using namespace std; int main(){ int sx,sy,tx,ty; cin>>sx>>sy>>tx>>ty; for(int i=0;i<tx-sx;i++){ cout<<"R"<<endl; } for(int i=0;<i<ty-sy;i++){ cout<<"U"<<endl; } for(int i=0;i<tx-sx;i++){ cout<<"L"<<endl; } for(int i=0;i<ty-sy;i++){ cout<<"D"<<endl; } cout<<"L"<<endl; for(...
a.cc: In function 'int main()': a.cc:9:15: error: expected primary-expression before '<' token 9 | for(int i=0;<i<ty-sy;i++){ | ^
s295809196
p03836
C++
#include<cstdio> int main(){ int sx, sy, tx, tv; scanf("%d %d %d %d", &sx, &sy, &tx, &tv); tx -= sx, ty -= sy; for (int i = 0; i < tx; ++i) printf("R"); for (int i = 0; i < ty + 1; ++i) printf("U"); for (int i = 0; i < tx + 1; ++i) printf("L"); for (int i = 0; i < ty + 1; ++i) printf("D"); printf("R"); for (i...
a.cc: In function 'int main()': a.cc:6:19: error: 'ty' was not declared in this scope; did you mean 'tv'? 6 | tx -= sx, ty -= sy; | ^~ | tv
s231068272
p03836
C++
#include <bits/stdc++.h> using namespace std; int main() { cin >> sx >> sy >> tx >> ty ; for (int i=0, i<tx-sx ; i++){ cout << R ; } for (int i=0, i<ty-sy ; i++){ cout << U ; } for (int i=0, i<tx-sx ; i++){ cout << L ; } for (int i=0, i<ty-sy+1 ; i++){ cout << D ; } for (int i=0,...
a.cc: In function 'int main()': a.cc:5:10: error: 'sx' was not declared in this scope 5 | cin >> sx >> sy >> tx >> ty ; | ^~ a.cc:5:16: error: 'sy' was not declared in this scope 5 | cin >> sx >> sy >> tx >> ty ; | ^~ a.cc:5:22: error: 'tx' was not declared in this scope;...
s650483028
p03836
C++
#include <bits/stdc++.h> using namespace std; int main(){ int sx, sy, tx, ty, i; cin >> sx >> sy >> tx >> ty; for(i=0; i<tx-sx; i++){ cout << 'R'; } for(i=0; i<ty-tx; i++){ cout << 'U'; } for(i=0; i<tx-sx; i++){ cout << 'L'; } for(i=0; i<ty-tx; i++){ ...
a.cc: In function 'int main()': a.cc:26:23: error: expected ';' before 'for' 26 | cout << 'L' << 'U' | ^ | ; 27 | for(i=0; i<tx-sx; i++){ | ~~~ a.cc:27:26: error: expected ';' before ')' token 27 | for(i=0; i<tx-sx; i...
s173739202
p03836
C++
dx[] = {0, 1, 0, -1}; int dy[] = {-1, 0, 1, 0}; /* テンプレここまで */ int sx, sy, tx, ty; vector<vector<int>> visited(2010, vector<int>(2010, -1)); vector<pair<int, int>> goals; int goal_idx = 1; queue<pair<int, int>> pos_queue; string ans(){ string ans_str = ""; int x = goals[goal_idx].first, y = goals[goal_idx].s...
a.cc:1:1: error: 'dx' does not name a type 1 | dx[] = {0, 1, 0, -1}; | ^~ a.cc:6:1: error: 'vector' does not name a type 6 | vector<vector<int>> visited(2010, vector<int>(2010, -1)); | ^~~~~~ a.cc:7:1: error: 'vector' does not name a type 7 | vector<pair<int, int>> goals; | ^~~~~~ a.cc:9:1...
s368197846
p03836
C++
#include <bits/stdc++.h> using namespace std; int main() { int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty; int nx, ny; nx = tx - sx; ny = ty - sy; for(int i = 0; i < nx; i++){ cout << "R"; } for(int i = 0; i < ny; i++){ cout << "U"; } for(int i = 0; i < nx; i++){ cout << "L"; } fo...
a.cc: In function 'int main()': a.cc:29:7: error: expected ';' before string constant 29 | cout "LU"; | ^~~~~ | ;
s789755228
p03836
C++
#include <iostream> #include <array> #include <vector> #include <iomanip> #include <string> #include <cmath> #include <algorithm> #include <queue> #include <map> #include <set> using namespace std; typedef pair<int,int> P; typedef long long LL; const LL INF=1<<31; const LL MOD=1000000007; int main(){ int sx...
a.cc: In function 'int main()': a.cc:34:60: error: no match for 'operator<<' (operand types are 'std::__cxx11::basic_string<char>' and '<unresolved overloaded function type>') 34 | ans+=u+r+d+l+'D'+r+'R'+u+'U'+'L'+'U'+l+'L'+d+'D'+r+'R'<<endl; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~...
s622985688
p03836
C++
#include <stdio.h> #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define P pair<ll,ll> #define FOR(i,n,m) for(ll i=n; i<(ll)m;i++) #define FORr(i,n,m) for(ll i=n; i>=(ll)m; i--) #define FORm(i,m) for(auto i=m.begin();i!=m.end();i++) #define VEC2(x,a,b) vector<vector<ll>> x ...
a.cc: In function 'int main()': a.cc:52:11: error: unable to find string literal operator 'operator""endl' with 'const char [2]', 'long unsigned int' arguments 52 | cout<<"U"endl; | ^~~~~~~
s664669587
p03836
C
#include <stdio.h> int main(void){ int x,y,sx,sy,tx,ty,i; x=tx-sx: y=ty-sy; for(i=0;i<y;i++); printf("U"); for(i=0;i<x;i++); printf("R"); for(i=0;i<y;i++); printf("D"); for(i=0;i<=x;i++); printf("L"); for(i=0;i<=y;i++); printf("U"); for(i=0;i<=x;i++); printf("R"); printf("DR"); for(i...
main.c: In function 'main': main.c:4:10: error: expected ';' before ':' token 4 | x=tx-sx: | ^ | ;
s711767720
p03836
C++
#include<bits/stdc++.h> int main(void){ int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty; for(int i=0;i<tx-sx;++i){ cout << "U"; } for(int i=0;i<ty-sy;++i){ cout << "R"; } for(int i=0;i<tx-sx;++i){ cout << "D"; } for(int i=0;i<=ty-sy;++i){ cout << "L"; } for(int i=0;i<=tx-sx;++i){ ...
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> sx >> sy >> tx >> ty; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream...
s348786868
p03836
C++
#include<bits/stdc++.h> using namespace std; int main() { int sx,sy,tx,ty; cin>>sx>>sy>>tx>>ty; int y=ty-sy; int x=tx-sx; for(int i=0;i<y;i++) cout<<'U'; for(int i=0;i<x;i++) cout<<'R'; for(int i=0;i<y;i++) cout<<'D'; for(int i=0;i<x;i++) cout<<'L'; cout<<'L'; for(int i=0;i<y+1;i++) cout<<'U'; for(int i...
a.cc: In function 'int main()': a.cc:26:27: error: expected ';' before numeric constant 26 | for(int i=0;i<x+10 0 1 2;i++) | ^~ | ; a.cc:26:29: error: expected ')' before numeric constant 26 | for(int i=0;i<x+10 0 1 2;i++) | ...
s102795870
p03836
C++
#include<bits/stdc++.h> using namespace std; int main(){ int sx,sy,tx,ty; cin>>sx>>sy>>tx>>ty; int dx=ts-sx; int dy=ty-sy; cout<<string(dy,'U')<<string(dx,'R'); cout<<string(dy,'D')<<string(dx,'L'); cout<<"L"<<string(dy+1,'U')<<string(dx+1,'R')<<'D'; cout<<'R'<<string(dy+1,'D')<<string(dx+1,'L')<<'U'; return 0...
a.cc: In function 'int main()': a.cc:6:16: error: 'ts' was not declared in this scope; did you mean 'ty'? 6 | int dx=ts-sx; | ^~ | ty
s270312780
p03836
C++
using namespace std; typedef long long ll; typedef unsigned long long ull; int main(){ int i,s1,s2,t1,t2; cin>>s1>>s2>>t1>>t2; for(i=1;i<=t2-s2;i++) cout<<"U"; for(i=1;i<=t1-s1;i++) cout<<"R"; for(i=1;i<=t2-s2;i++) cout<<"D"; for(i=1;i<=t1-s1;i++) cout<<"L"; cout<<"L"; for(i=1;i<=t2-s2+1;i++) cout<<"U"; for...
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | cin>>s1>>s2>>t1>>t2; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a...
s925970151
p03836
C++
sx, sy, tx, ty = map(int, input().split()) ans = "" for i in range(ty-sy): ans += "U" for i in range(tx-sx): ans += "R" for i in range(ty-sy): ans += "D" for i in range(tx-sx): ans += "L" ans += "L" for i in range(ty-sy+1): ans += "U" for i in range(tx-sx+1): ans += "R" ans += "D" for i in rang...
a.cc:1:1: error: 'sx' does not name a type 1 | sx, sy, tx, ty = map(int, input().split()) | ^~
s372024303
p03836
C++
int main(){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; for(int i = sx;i < tx;i++) cout << 'R'; for(int i = sy;i < ty;i++) cout << 'U'; for(int i = sx;i < tx;i++) cout << 'L'; for(int i = sy;i < ty;i++) cout << 'D'; cout << 'D'; for(int i = sx;i < tx+1;i++) cout << 'R'; for(int i = sy;i < ty+1;i++...
a.cc: In function 'int main()': a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> sx >> sy >> tx >> ty; | ^~~ a.cc:6:30: error: 'cout' was not declared in this scope 6 | for(int i = sx;i < tx;i++) cout << 'R'; | ^~~~ a.cc:7:30: error: 'cout' was not ...
s016949480
p03836
C
#include<stdio.h> int main(void){ int i; //for loop int sx,sy,tx,ty; //for input int dx,dy; //different err=scanf("%d",&sx); if(err==EOF){return 0;} err=scanf("%d",&sy); if(err==EOF){return 0;} err=scanf("%d",&tx); if(err==EOF){return 0;} err=scanf("%d",&ty); if(err==EOF){return 0;} dx=tx-s...
main.c: In function 'main': main.c:8:3: error: 'err' undeclared (first use in this function) 8 | err=scanf("%d",&sx); | ^~~ main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
s969902017
p03836
C
#include<itdio.h> int main(void){ int i; //for loop int sx,sy,tx,ty; //for input int dx,dy; //different err=scanf("%d",&sx); if(err==EOF){return 0;} err=scanf("%d",&sy); if(err==EOF){return 0;} err=scanf("%d",&tx); if(err==EOF){return 0;} err=scanf("%d",&ty); if(err==EOF){return 0;} dx=tx-s...
main.c:1:9: fatal error: itdio.h: No such file or directory 1 | #include<itdio.h> | ^~~~~~~~~ compilation terminated.
s190986589
p03836
C
#include<stdio.h> int main(void){ int i; //for loop int sx,sy,tx,ty; //for input int dx,dy; //different err=scanf("%d",&sx); err=scanf("%d",&sy); err=scanf("%d",&tx); err=scanf("%d",&ty); if(err==EOF){return 1;} dx=tx-sx; dy=ty-sy; for(i=0;i<dy;i++){printf("U");} for(i=0;i<dx;i++){prin...
main.c: In function 'main': main.c:8:3: error: 'err' undeclared (first use in this function) 8 | err=scanf("%d",&sx); | ^~~ main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
s762216905
p03836
C
#include<stdio.h> int main(void){ int i; //for loop int sx,sy,tx,ty; //for input int dx,dy; //different err=scanf("%d",&sx); err=scanf("%d",&sy); err=scanf("%d",&tx); err=scanf("%d",&ty); dx=tx-sx; dy=ty-sy; for(i=0;i<dy;i++){printf("U");} for(i=0;i<dx;i++){printf("R");} for(i=0;i<dy;i++...
main.c: In function 'main': main.c:8:3: error: 'err' undeclared (first use in this function) 8 | err=scanf("%d",&sx); | ^~~ main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
s615794221
p03836
C++
#include <iostream> #include <cstring> using namespace std; int main(void){ int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty; for (int i = sy, i < ty, i++) cout << "U"; for (int i = sx, i < tx, i++) cout << "R"; for (int i = ty, i > sy, i++) cout << "D"; for (int i = tx, i > sx, i++) cout << "L"...
a.cc: In function 'int main()': a.cc:8:23: error: expected ';' before '<' token 8 | for (int i = sy, i < ty, i++) cout << "U"; | ^~ | ; a.cc:8:24: error: expected primary-expression before '<' token 8 | for (int i = sy, i < ty, i++) cout << "U"; ...
s817374292
p03836
C++
sx, sy, tx, ty = map(int, input().split()) dx = abs(tx - sx) dy = abs(ty - sy) ans = '' ans += 'R' * dx ans += 'U' * dy ans += 'L' * dx ans += 'D' * dy ans += 'D' ans += 'R' * (dx + 1) ans += 'U' * (dy + 1) ans += 'L' ans += 'U' ans += 'L' * (dx + 1) ans += 'D' * (dy + 1) ans += 'R' print(ans)
a.cc:6:7: error: empty character constant 6 | ans = '' | ^~ a.cc:1:1: error: 'sx' does not name a type 1 | sx, sy, tx, ty = map(int, input().split()) | ^~
s545757489
p03836
C++
#include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <numeric> #include <string> #include <iomanip> using namespace std; const double PI = acos(-1.0); const string alp = "abcdefghijklmnopqrstuvwxyz"; const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const int INTMAX = 2147483647; const i...
a.cc:16:23: warning: integer constant is so large that it is unsigned 16 | const long LONGMIN = -9223372036854775808; | ^~~~~~~~~~~~~~~~~~~ a.cc:17:32: warning: integer constant is so large that it is unsigned 17 | const unsigned long ULONGMAX = 18446744073709551615; | ...
s179750440
p03836
C++
#include<iostream> using namespace std; int sx, sy, tx, ty; int X, Y; int main(){ cin >> sx >> sy >> tx >> ty; X = tx - sx; Y = ty - sy; for(int i = 0; i < X; i++){ cout << R; } for(int i = 0; i < Y; i++){ cout << U; } for(int i = 0; i < X; i++){ cout << L; } for(int i = 0; i < Y; i++){ cout << D;...
a.cc: In function 'int main()': a.cc:14:25: error: 'R' was not declared in this scope 14 | cout << R; | ^ a.cc:17:25: error: 'U' was not declared in this scope 17 | cout << U; | ^ a.cc:20:25: error: 'L' was not declared in...
s097719171
p03836
C++
#include <iostream> #include <algorithm> #include <cmath> #include <iomanip> #include <vector> #include <utility> #include <numeric> #include <string> #include <set> #include <map> #include <tuple> #include <queue> #include <stack> #include <deque> #define rep(i, a, n) for(int (i) = (int)(a);(i) < (int)(n);++(i)) #defi...
a.cc:67:39: warning: missing terminating " character 67 | repr(i, tx+1, sx) ans.pb('L');" | ^ a.cc:67:39: error: missing terminating " character
s452841232
p03836
C++
#include<iostream> #define abs(x) ((x)<0?-1*(x):(x)) using namespace std; int main() { int sx, sy; int tx, ty; cin>>sx>>sy; cin>>tx>>ty; if(sx == tx){ printf("R"); } if(sy==ty) printf("D"); for(int i = 0; i < abs(sx-tx)) printf("%c",(sx<tx?'R':'L')); if(sy==ty) printf("U"); f...
a.cc: In function 'int main()': a.cc:17:32: error: expected ';' before ')' token 17 | for(int i = 0; i < abs(sx-tx)) | ^ a.cc:21:32: error: expected ';' before ')' token 21 | for(int i = 0; i < abs(sy-ty)) | ^ a.cc:28:32: error: expecte...
s517348690
p03836
C++
#include<iostream> #define abs(x) ((x)<0?-1*(x):(x)) using namespace std; int main() { int sx, sy; int tx, ty; cin>>sx>>sy; cin>>tx>>ty; if(sx == tx){ printf("R"); } if(sy==ty) printf("D"); for(int i = 0; i < abs(sx-tx)) printf("%c",(sx<tx?'R':'L')); if(sy==ty) printf("U"); fo...
a.cc: In function 'int main()': a.cc:17:32: error: expected ';' before ')' token 17 | for(int i = 0; i < abs(sx-tx)) | ^ a.cc:21:32: error: expected ';' before ')' token 21 | for(int i = 0; i < abs(sy-ty)) | ^ a.cc:28:32: error: expecte...
s855374952
p03836
C++
#include <bits/stdc++.h> using namespace std; #define forx(i, a, b) for (int i = (a); i < (b); i++) #define rep(j, n) for (int j = 0; j < (n); j++) typedef long long ll; int main() { int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty; int h = tx - sx; int v = ty - sy; rep(i, v) cout << 'U'; rep(i...
a.cc: In function 'int main()': a.cc:25:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 25 | cout << "LLU" < endl; | ~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include...
s072584151
p03836
C++
l = input().split(' ') y = int(l[3]) - int(l[1]) x = int(l[2]) - int(l[0]) def my_print(i,str): for j in range(i): print(str,end='') """ for i in range(x): print('U',end='') for i in range(y): print('R',end='') for i in range(x): print('D',end='') for i in range(y+1): print('L',end='') ...
a.cc:8:23: error: empty character constant 8 | print(str,end='') | ^~ a.cc:9:3: warning: missing terminating " character 9 | """ | ^ a.cc:9:3: error: missing terminating " character a.cc:11:19: error: empty character constant 11 | print('U',end='') | ...
s911032905
p03836
C++
#include <iostream> using namespace std; int main(){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; const int dx=tx-sx,dy=ty-sy; cout << string(dy,’U’) << string(dx,’R’); cout << string(dy,’D’) << string(dx,’L’); cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;...
a.cc:8:27: error: extended character ’ is not valid in an identifier 8 | cout << string(dy,’U’) << string(dx,’R’); | ^ a.cc:8:27: error: extended character ’ is not valid in an identifier a.cc:8:45: error: extended character ’ is not valid in an identifier 8 | cou...
s626441737
p03836
C++
#include <iostream> using namespace std; int main(){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; const int dx=tx-sx,dy=ty-sy; cout << string(dy,’U’) << string(dx,’R’); cout << string(dy,’D’) << string(dx,’L’); cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;...
a.cc:8:27: error: extended character ’ is not valid in an identifier 8 | cout << string(dy,’U’) << string(dx,’R’); | ^ a.cc:8:27: error: extended character ’ is not valid in an identifier a.cc:8:45: error: extended character ’ is not valid in an identifier 8 | cou...
s961440578
p03836
C++
#include <iostream> using namespace std; int main(){ int sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty; const int dx=tx-sx,dy=ty-sy; cout << string(dy,’U’) << string(dx,’R’); cout << string(dy,’D’) << string(dx,’L’); cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’...
a.cc:9:27: error: extended character ’ is not valid in an identifier 9 | cout << string(dy,’U’) << string(dx,’R’); | ^ a.cc:9:27: error: extended character ’ is not valid in an identifier a.cc:9:45: error: extended character ’ is not valid in an identifier 9 | cou...
s536378817
p03836
C++
#include<cstdio> #include<algorithm> #include<cstring> #include<cmath> char str[100005]; int main() { int sx,sy,tx,ty; while(scanf("%d%d%d%d",&sx,&sy,&tx,&ty)!=EOF) { int ans=sqrt((ty-sy)*(ty-sy)); int sum=sqrt((tx-sx)*(tx-sx)); for(int i=1; i<=ans; i++) printf("U"); for(int i=1; i<=sum; i++) printf("R")...
a.cc: In function 'int main()': a.cc:9:48: error: expected ')' before '\U0000ff01' 9 | while(scanf("%d%d%d%d",&sx,&sy,&tx,&ty)!=EOF) | ~ ^~ | ) a.cc:9:48: error: '\U0000ff01' was not declared in this scop...
s294446733
p03836
C++
// ------------------------------------ // Date:2018/ 2/26 // Problem:ABC 051 BackAndForth c.cpp // // ------------------------------------ #include <bits/stdc++.h> using namespace std; #define EACH(i,a) for (auto&& i : a) #define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i) #define RFOR(i,a,b) for(int i=(int)b-1;i>=(i...
a.cc: In function 'int main()': a.cc:25:10: error: 'dp' was not declared in this scope; did you mean 'dup'? 25 | memset(dp,0,sizeof(dp)); | ^~ | dup
s162809974
p03836
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #define PB push_back #define PQ priority_que...
a.cc: In function 'int main()': a.cc:38:14: error: 'XY' was not declared in this scope; did you mean 'TY'? 38 | FOR(i,0,TY-XY+1){ | ^~ a.cc:11:34: note: in definition of macro 'FOR' 11 | #define FOR(i,a,b) for(int i=a;i<b;i++) | ^ a.cc:46:14: error: 'XY'...
s561323107
p03836
C++
#include <iostream> #include <string> #include <cmath> using namespace std; int sx,sy,tx,ty; int dx,dy; char right_; char left_; char up_; char down_; int main() { cin >> sx >> sy >> tx >> ty; if(sx <= tx) { right_ = 'R'; left_ = 'L'; } else { right_ = 'L'; left_ = 'R'; } if(sy <= ty) { up_ = '...
a.cc: In function 'int main()': a.cc:75:32: error: unable to find numeric literal operator 'operator""S' 75 | for(int i = 0;i < dy + 1S;i++) | ^~
s627011382
p03836
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty; int x = tx - sx; int y = ty - sy; for(int i = 0; i < x; i++) cout << "R" <<; for(int i = 0; i < y; i++) cout << "U" <<; for(int i = 0; i < x; i++) cout << "L" <<; for(int i = 0; i ...
a.cc: In function 'int main()': a.cc:9:46: error: expected primary-expression before ';' token 9 | for(int i = 0; i < x; i++) cout << "R" <<; | ^ a.cc:10:46: error: expected primary-expression before ';' token 10 | for(int i = 0; i < y; i++) cout << "U" ...
s608862095
p03836
C++
using namespace std; #include<iostream> #include<string> int main() { int a,b,c,d,e,f; cin>>a>>b>>c>>d; f=c-a; e=d-b; if(e>1 && f>1) { for(int i=0;i<e-1;i++) cout<<"U"; for(int j=0;j<f-1;j++) cout<<"R"; cout<<"U"<<"RR"; for(int k=0;k...
a.cc:63:5: error: expected unqualified-id before 'return' 63 | return 0; | ^~~~~~