submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s135321238 | p03835 | Java |
import java.util.Scanner;
public class Main {
public static void main(String[] ar)
{
Scanner sc = new Scanner(System.in);
int cnt = 0;
int k = sc.nextInt(), def = sc.nextInt();
int x = 0, y = 0, z = def;
if (x <= k && y <= k && z <= k) { ++cnt; }
// y -> x
while (true)
{
z = def - x;
y = 0... | Main.java:35: error: unreachable statement
System.out.println(cnt);
^
1 error
|
s061569842 | p03835 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int K = sc.nextInt();
int S = sc.nextInt();
int count = 0;
for(int X = 0; X <= K; X++) {
for(int Y = 0; Y <= K; Y++) {
int Z = S - (X + Y);
if(0 <=... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s955223306 | p03835 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int K = sc.nextInt();
int S = sc.nextInt();
int count = 0;
for(int X = 0; X <= K; X++) {
for(int Y = 0; Y <= K; Y++) {
int Z = S - (X + Y);
if(0 <=... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s197360444 | p03835 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
int main()
{
int k,s;
scanf("%d%d",&k,&s)
int cnt=0;
for(int i=0; i<=k; i++)
for(int j=0; j<=k; j++)
{
int z=s-i-j;
if(z>=0&&z<=... | a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 'int'
13 | scanf("%d%d",&k,&s)
| ^
| ;
14 | int cnt=0;
| ~~~
a.cc:20:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
20 | ... |
s478033482 | p03835 | C++ | int main() {
int K, S;
int cnt=0;
cin >> K >> S;
for (int i=0; i <= K; i++) {
for (int j=0; j <= K; j++) {
if (0 <= (j + i - S) && (j + i - S) <= K) {
cnt++;
}
}
}
cout<<cnt<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin >> K >> S;
| ^~~
a.cc:16:9: error: 'cout' was not declared in this scope
16 | cout<<cnt<<endl;
| ^~~~
a.cc:16:20: error: 'endl' was not declared in this scope
16 | ... |
s251341880 | p03835 | C++ | #include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int main()
{
int K, S;
int X, Y, Z;
int cnt = 0;
cin >> K >> S;
for(int i = 0; i <= K; i++) {
for(int j = 0; j <= K; j++) {
z = S - x - y;
if(z >= 0 && z <= K) {
cnt++;
... | a.cc: In function 'int main()':
a.cc:19:7: error: 'z' was not declared in this scope
19 | z = S - x - y;
| ^
a.cc:19:15: error: 'x' was not declared in this scope
19 | z = S - x - y;
| ^
a.cc:19:19: error: 'y' was not declared in this scope
19 | z = S - x - y;
... |
s630649334 | p03835 | C++ | #include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int main()
{
int K, S;
int X, Y, Z;
int cnt = 0;
cin >> K >> S;
for(int i = 0; i <= K; i++) {
for(int j = 0; j <= K; j++) {
z = S - x - y
if(z >= 0 && z <= K) {
cnt++;
}... | a.cc: In function 'int main()':
a.cc:19:7: error: 'z' was not declared in this scope
19 | z = S - x - y
| ^
a.cc:19:15: error: 'x' was not declared in this scope
19 | z = S - x - y
| ^
a.cc:19:19: error: 'y' was not declared in this scope
19 | z = S - x - y
... |
s222329128 | p03835 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int c=0,x,y,z,s,k;
k=sc.nextInt();
s=sc.nextInt();
for(x=0;i<=s;i++)
{
for(y=0;y<=s;y++)
{
for(z=0;z<=s;z++)
{
if((x+y+z)==s)
c++;
}
}
}
... | Main.java:10: error: cannot find symbol
for(x=0;i<=s;i++)
^
symbol: variable i
location: class Main
Main.java:10: error: cannot find symbol
for(x=0;i<=s;i++)
^
symbol: variable i
location: class Main
2 errors
|
s631091556 | p03835 | Java | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
String inputString = scanner.nextLine();
String[] strStdIn = inputString.split(" ", 0);
int initialNum = Integer.parseInt(strStdIn[0]);
int totalNum = Integer.parseInt(s... | Main.java:40: error: <identifier> expected
System.out.println(count);
^
Main.java:40: error: <identifier> expected
System.out.println(count);
^
Main.java:42: error: class, interface, enum, or record expected
}
^
3 errors
|
s857858924 | p03835 | C++ | #include<iostream>
using namespace std;
int main(){
int k,s;
int ans = 0;
cin>>k>>s;
for(int a=0;a<=k;a++){
for(int b=0;b<=k;b++){
int c = s-a-b;
if(c>=0 && c=<k){
ans++;
}
}
}
cout<<ans<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:30: error: expected primary-expression before '<' token
12 | if(c>=0 && c=<k){
| ^
|
s362614432 | p03835 | Java |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] s = br.readLine().split(" ", 0);
int K = Integer.pars... | Main.java:33: error: class, interface, enum, or record expected
}
^
1 error
|
s871866500 | p03835 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#define REP(i,n) for (int i=0;i<(n);i++)
#define ll long long
#define ull unsigned long long
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
int main(){
cin.tie(0);
ios::sync_w... | a.cc:29:3: error: expected unqualified-id before 'return'
29 | return 0;
| ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
30 | }
| ^
|
s451971935 | p03835 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int k = sc.nextInt();
int s = sc.nextInt();
int c=0;
int ans = 0;
for( int a=0; a<=k; a++ ){
for(int b=0; b<=k; b++){
c = s-a-b;
if( z >= 0 && z <= k){
ans++;
}... | Main.java:14: error: cannot find symbol
if( z >= 0 && z <= k){
^
symbol: variable z
location: class Main
Main.java:14: error: cannot find symbol
if( z >= 0 && z <= k){
^
symbol: variable z
location: class Main
2 errors
|
s667631413 | p03835 | Java | ds | Main.java:1: error: reached end of file while parsing
ds
^
1 error
|
s207925017 | p03835 | C++ | #include<bits/stdc++.h>
#define int long long int
#define rep(a,b,c) for(int a=b;a<c;a++)
#define repm(a,b,c) for(int a=(b-1);a>=c;a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d",&a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) (v).begin(), (v).end(... | a.cc: In function 'void ans3()':
a.cc:94:13: error: 'ss' was not declared in this scope; did you mean 's'?
94 | cout << ss.size() << endl;
| ^~
| s
|
s185597748 | p03835 | C | #include<cstdio>
int main(){
int k,s;
scanf("%d%d",&k,&s);
printf("%d\n",(++s*s+s-(k>s?0:3*(s-k)*(s-k-1))+(k*2>s?0:3*(s-2*k-1)*(s-2*k-2)))/2);++s;
return 0;
}
| main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s072297726 | p03835 | C++ | #include<iostream>
#include<vector>
#include<math.h>
using namespace std;
int main() {
int a, b, ans = 0;
cin >> a >> b;
for(int i = 0; i <= a; i++) {
if(b < i + j + k) break;
for(int j = 0; j <= a; j++) {
if(b < i + j + k) break;
for(int k = 0; k <= a; k++) {
if(b < i + j + k) break;... | a.cc: In function 'int main()':
a.cc:10:16: error: 'j' was not declared in this scope
10 | if(b < i + j + k) break;
| ^
a.cc:10:20: error: 'k' was not declared in this scope
10 | if(b < i + j + k) break;
| ^
a.cc:12:22: error: 'k' was not declared in this scop... |
s351630365 | p03835 | C | #include <stdio.h>
int main(){
int K, S;
int cnt = 0;
scanf("%d", &K);
scanf("%d", &S);
if(3*K == S) {
printf("1\n");
return 0;
}
for(int i = 0; i <=K; i++) {
if(i+K+K < S) break;
for(int j = 0; j <=K; j++) {
if(i+j+K < S) break;
if(i+j+K/2 > S) {
... | main.c: In function 'main':
main.c:34:1: error: expected declaration or statement at end of input
34 | }
| ^
main.c:34:1: error: expected declaration or statement at end of input
|
s750958502 | p03835 | C | #include <stdio.h>
int main(){
int K, S;
int cnt = 0;
scanf("%d", &K);
scanf("%d", &S);
if(3*K == S) {
printf("1\n");
return 0;
}
for(int i = 0; i <=K; i++) {
if(i+K+K < S) break;
for(int j = 0; j <=K; j++) {
if(i+j+K < S) break;
if(i+j+k/2 > S) {
... | main.c: In function 'main':
main.c:17:16: error: 'k' undeclared (first use in this function)
17 | if(i+j+k/2 > S) {
| ^
main.c:17:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:1: error: expected declaration or statement at end of inp... |
s425913203 | p03835 | C | #include <stdio.h>
int main(){
int K, S;
int cnt = 0;
scanf(" %d", &K);
scanf(" %d", &S);
if(3*K == S) {
printf("1\n");
return 0;
}
for(int i = 0; i <=K; i++) {
for(int j = 0; j <=K; j++) {
for(int l = 0; l <=K; l++) {
if(i+j+l == S) {
cnt++;
... | main.c: In function 'main':
main.c:18:20: error: expected ';' before '}' token
18 | break
| ^
| ;
19 | }
| ~
|
s591741367 | p03835 | C++ | #include <bits/stdc++.h>
#define rep(i,a,b) for(int i=(a); i<(b); i++)
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define sort(v,n) sort(v,v+n);
#define vsort(v) sort(v.begin(),v.end());
#define ll long long
#define pb(a) push_back(a)
#define fi first
#define se second
#define inf 9999... | a.cc: In function 'int main()':
a.cc:32:25: error: 'as' was not declared in this scope; did you mean 's'?
32 | }else if(3*k-2>=as) {
| ^~
| s
|
s175062518 | p03835 | C++ | // b.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include<iostream>
using namespace std;
int main()
{
int K, S;
cin >> K >> S;
int res = 0;
for (int left = 0; left <= K; left++)
{
int right = K;
for (; right >= left; right--)
{
int mid = S - left - right;
if (mid < left || mid > right)
continue;
... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s210151645 | p03835 | C | #include<stdio.h>
int main(void){
int k,s;
int i=0;
int a, b, c;
scanf("%d %d",&k,&s);
for(a=0;a<=k;a++){
for(b=0;b<=k;b++){
for(c=0;c<=k;c++){
if(a+b+c==s)i++;
else(a+b+c>s)break;
}
}
}
printf("%d\n",i);
return 0;
}
| main.c: In function 'main':
main.c:15:22: error: expected ';' before 'break'
15 | else(a+b+c>s)break;
| ^~~~~
| ;
|
s721618482 | p03835 | C++ | include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#define FOR(i,k,n) for((i)=(k);(i)<(n);(i)++)
#define REP(i,n) for (int i=0;i<=(n);i++)
#define pb push_back
#define VSORT(S) sort(S.begin(), S.end());
using namespace std;
int main(){
int S,K,i,j,count;
count = 0;
cin>>K; cin>>S;
REP(... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu... |
s151845856 | p03835 | C | include<stdio.h>
int main(void){
int K,S;
int x,y,z;
int count = 0;
scanf("%d %d",&K,&S);
for(x=0;x<=K;x++){
for(y=0;y<=K;y++){
for(z=0;z<=K;z++){
if(x+y+z==S){
coun... | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s393880218 | p03835 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <set>
#include <map>
#include <queue>
#include <stack>
using namespace std;
#define INF 1010001000
#define EPS 1e-10
#define rep(i, N) for (int i = 0; i < N; i++)
#define pb pus... | a.cc: In function 'int main()':
a.cc:42:14: error: expected '}' at end of input
42 | return 0;
| ^
a.cc:26:1: note: to match this '{'
26 | {
| ^
|
s718574104 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<=(int)(n);++(i))
int main() {
int K, S: cin >> K >> S;
long long ans=0;
rep(i,K) rep(j,K) rep(k,K) {
if (i+j+k == S) ans++;
}
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:13: error: found ':' in nested-name-specifier, expected '::'
6 | int K, S: cin >> K >> S;
| ^
| ::
a.cc:6:12: error: 'S' has not been declared
6 | int K, S: cin >> K >> S;
| ^
a.cc:6:19: error: qualified-id in de... |
s936822124 | 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’) << ’D’;
/... | a.cc:11:19: error: extended character ’ is not valid in an identifier
11 | cout << string(dy,’U’) << string(dx,’R’);
| ^
a.cc:11:19: error: extended character ’ is not valid in an identifier
a.cc:11:37: error: extended character ’ is not valid in an identifier
11 | cout << string(dy,’U’) <... |
s544819895 | p03836 | Java | import java.util.*;
import java.io.*;
public class HelloWorld{
public static void main(String []args){
Scanner scanner = new Scanner(System.in);
int sx = scanner.nextInt();
int sy =scanner.nextInt();
int tx = scanner.nextInt();
int ty =scanner.nextInt();
... | Main.java:5: error: class HelloWorld is public, should be declared in a file named HelloWorld.java
public class HelloWorld{
^
1 error
|
s248816957 | p03836 | C++ | #include<iostream>
using namespace std;
int main(){
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int i;
for(i=0;i<tx-sx;i++)cout << 'R';
for(i=0;i<ty-sy;i++)cout << 'U';
for(i=0;i<tx-sx;i++)cout << 'L';
for(i=0;i<ty-sy;i++)cout << 'D';
cout << 'D';
for(i=0;i<tx-sx+1;i++)cout << 'R';
for(i=0;i<ty-sy... | a.cc: In function 'int main()':
a.cc:18:12: error: expected '}' at end of input
18 | return 0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s137124317 | p03836 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.NoSuchElementException;
public class Main {
public static void main(String[] args) {
for(int i=0;i... | Main.java:171: error: illegal start of type
}else {
^
1 error
|
s273876557 | p03836 | Java | import java.util.*;
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();
int x = tx - sx;
int y = ty - sy;
for (int j = 1; j <= 2; i++) {
... | Main.java:14: error: cannot find symbol
for (int j = 1; j <= 2; i++) {
^
symbol: variable i
location: class Main
1 error
|
s259062769 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 5e4+5;
const int mod = 1e9+7;
//R , L , D , U
string dr = "RLDU";
int dx[]{1 , -1 , 0 , 0};
int dy[]{0 , 0 , -1 , 1};
int sx , sy;
int tx , ty;
string ans = "";
bool vis[N][N];
bool act[N][N];
pair < int , int > from[N][N];
char is[... | /tmp/cc2mnSYL.o: in function `bfs(int, int, int, int)':
a.cc:(.text+0x7b): relocation truncated to fit: R_X86_64_PC32 against symbol `from' defined in .bss section in /tmp/cc2mnSYL.o
a.cc:(.text+0x223): relocation truncated to fit: R_X86_64_PC32 against symbol `act' defined in .bss section in /tmp/cc2mnSYL.o
a.cc:(.tex... |
s890785665 | p03836 | C++ | #include <iostream>
#include <queue>
#include <cstring>
using namespace std;
const int N=2010;
const int offset=1000;
typedef pair<int,int> PII;
int sx, sy, tx, ty;
int g[N][N];//0-路,1-墙
int dist[N][N];
int dx[]={0,1,0,-1},dy[]={1,0,-1,0};
PII prev[N][N];
void bfs(int sx, int sy, int tx, int ty){
memset(prev,0,sizeo... | a.cc: In function 'void bfs(int, int, int, int)':
a.cc:14:16: error: reference to 'prev' is ambiguous
14 | memset(prev,0,sizeof(prev));
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /u... |
s862165840 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int sx, sy, tx, ty;
cin >> sx >> sy >> tx >> ty;
int dx = tx - sx; dy = ty - sy;
for (int i = 0; i < dy; i++) {
cout << "U";
}
for (int i = 0; i < dx; i++) {
cout << "R";
}
for (int i = 0; i < dy; i++) {
cout << "D";
}
... | a.cc: In function 'int main()':
a.cc:9:21: error: 'dy' was not declared in this scope; did you mean 'dx'?
9 | int dx = tx - sx; dy = ty - sy;
| ^~
| dx
|
s505242475 | p03836 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define pb push_back
#define ins insert
#define all(x)... | a.cc: In function 'void dfs(std::string, char)':
a.cc:109:21: error: 'n' was not declared in this scope
109 | if((int)s.size()==n){
| ^
|
s721386619 | p03836 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<bitset>
#include<deque>
#include<functional>
#include<iterator>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<utility>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define a firs... | a.cc: In function 'int main()':
a.cc:48:26: error: 'sx' was not declared in this scope; did you mean 'tx'?
48 | ll sz,sy,tx,ty; cin>>sx>>sy>>tx>>ty;
| ^~
| tx
a.cc:50:11: error: 'Y' was not declared in this scope
50 | rep(i,Y) cout<<'U';
... |
s052675716 | 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... | a.cc: In function 'int main()':
a.cc:4:2: error: 'cin' was not declared in this scope
4 | cin >> sx >> sy >> tx >> ty;
| ^~~
a.cc:9:2: error: 'cout' was not declared in this scope
9 | cout << string(dy,"U") << string(dx,"R");
| ^~~~
a.cc:9:10: error: 'string' was not declared in this scope
9... |
s741438213 | p03836 | C++ | #include <iostream>
#include <string>
#include <stdio.h>
#include <cassert>
#include <vector>
#include <algorithm>
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,"... | a.cc: In function 'int main()':
a.cc:15:23: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(const int&, const char [2])'
15 | cout << string(dy,"U") << string(dx,"R");
| ^
In file included from /usr/include/c++/14/string:54,
from /... |
s126469952 | 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+... | a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
3 | cin >> sx >> sy >> tx >> ty;
| ^~~
a.cc:8:2: error: 'cout' was not declared in this scope
8 | cout << string(dy,"U") << string(dx,"R");
| ^~~~
a.cc:8:10: error: 'string' was not declared in this scope
8... |
s227509745 | 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: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’) <... |
s614262243 | p03836 | C++ | #define EXE
#ifdef EXE
// -------------------------------------------------------
#include <iostream>
#include <string>
#include <stdio.h>
#include <cassert>
#include <vector>
#include <algorithm>
using namespace std;
int min_steps = 10000;
int painted_offset = 10;
// string s;
int sx = 0;
int sy = 0;
int tx = 1;
... | a.cc:26:1: error: 'cin' does not name a type
26 | cin >> sx >> sy >> tx >> ty;
| ^~~
|
s992607712 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
int maiin()
{
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 << "D";
for (int i = 0; i < tx - sx; i++)cout << "L";
for (int i = 0; i < ty - sy; i++)cout << "U";
... | a.cc: In function 'int maiin()':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
21 | }
| ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 ex... |
s111309198 | p03836 | C++ | #include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
#include <queue>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define all(x) (x).begin(), (x).end()
int main() {
int sx,sy,tx,ty;
cin>>sx>>sy>>tx>>ty;
int u,r;
u=ty-sy;
r=tx-sx;
rep(... | a.cc: In function 'int main()':
a.cc:24:11: error: 'd' was not declared in this scope
24 | rep(i,d+1)cout<<'D';
| ^
a.cc:8:34: note: in definition of macro 'rep'
8 | #define rep(i,n) for(int i=0; i<(n); i++)
| ^
|
s542674359 | p03836 | C++ | || oj test -c ./app
|| [!] update available: 7.6.0 -> 10.0.3
|| [*] run: $ pip3 install -U online-judge-tools
|| [*] see: https://github.com/kmyk/online-judge-tools/blob/master/CHANGELOG.md
|| [*] 4 cases found
||
|| [*] sample-1
|| [x] time: 0.011114 sec
|| [-] WA
|| output:
|| UUUUUUUUUUDDDDDDDDDDUUUUUUUUUUUDRDDDDDD... | a.cc:2:26: error: too many decimal points in number
2 | || [!] update available: 7.6.0 -> 10.0.3
| ^~~~~
a.cc:2:35: error: too many decimal points in number
2 | || [!] update available: 7.6.0 -> 10.0.3
| ^~~~~~
a.cc:1:1: error: expected unqu... |
s209298136 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int64_t MOD=1000000007;
int main() {
int a,b,x,y;
cin>>a>>b>>x>>y;
x-=a;
y-=b;
rep(i,x) coyt<<"R";
rep(i,y) cout<<"U";
rep(i,x) cout<<"L";
rep(i,y+1) cout<<"D";
rep(i,x+1) cout<<"R";
rep(i,y+1) cout<<... | a.cc: In function 'int main()':
a.cc:11:12: error: 'coyt' was not declared in this scope
11 | rep(i,x) coyt<<"R";
| ^~~~
|
s944207889 | p03836 | Java | import java.util.*;
public class Main {
public static int verticalSide;
public static int holizonticalSide;
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();
... | Main.java:27: error: non-static method verticalMove(List<String>,String) cannot be referenced from a static context
verticalMove(ansList, "D");
^
Main.java:30: error: non-static method holizonticalMove(List<String>,String) cannot be referenced from a static context
holizonticalMove(ansList, "L");
... |
s826404635 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B,C,D;
cin >> A >> B >> C >> D;
for(int i = 0; i < C-A; i++) {
cout << 'U';
}
for(int i = 0; i < D-B; i++) {
cout << 'R';
}
for(int i = 0; i < D-B+1; i++) {
cout << 'L';
}
for(int i = 0; i < C-A+... | a.cc: In function 'int main()':
a.cc:15:20: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
15 | for(int i = 0; i < C-A+1: i++) {
| ^
a.cc:15:29: error: expected ';' before ':' token
15 | for(int i = 0; i < ... |
s318608575 | p03836 | Java | import java.util.*;
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();
String first =
// 出力
System.out.println((a+b+c) + " " + s);
}
... | Main.java:14: error: cannot find symbol
System.out.println((a+b+c) + " " + s);
^
symbol: variable a
location: class Main
Main.java:14: error: cannot find symbol
System.out.println((a+b+c) + " " + s);
^
symbol: variable b
location: class Main
Main.java:14: er... |
s904556619 | 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<(ty-sy);i++){
cout << "U" <<end;
}
for(int i=0;i<(tx-sx);i++){
cout << "R" <<end;
}
for(int i=0;i<(ty-sy);i++){
cout << "D" <<end;
}
for(int i=0;i<(tx-sx);i++){... | a.cc: In function 'int main()':
a.cc:8:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
8 | cout << "U" <<end;
| ~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++... |
s209860327 | p03836 | C++ | #include <bits/stdc++.h>
#include <map> // pair
using namespace std;
typedef long long ll;
#define vec vector<int>
#define vecll vector<ll>
#define rep(i,n) for(int i=(int)0; i<(int)n; i++)
#define llrep(i,n) for(ll i=(ll)0; i<(ll)n; i++)
#define REP(i,m,n) for(int i=(int)m; i<(int)n; i++)
#define prt_dbl(i,var) c... | a.cc: In function 'int main()':
a.cc:60:3: error: 'Point' was not declared in this scope
60 | Point s;
| ^~~~~
a.cc:61:8: error: expected ';' before 't'
61 | Point t;
| ^~
| ;
a.cc:63:8: error: 's' was not declared in this scope
63 | cin>>s.x>>s.y>>t.x>>t.y;
| ... |
s180548842 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll main(){
ll sx,sy,tx,ty;
cin >>sx>>sy>>tx>>ty;
string s;
for (ll i = 0; i < ty-sy; i++) {
s.push_back('U');
}
for (ll i = 0; i < tx-sx; i++) {
s.push_back('R');
}
for (ll i = 0; i < ty-sy; i++) {
s.push_back('D');
}... | a.cc:5:1: error: '::main' must return 'int'
5 | ll main(){
| ^~
|
s121271975 | p03836 | C++ | # back and force
ln = list(map(int, input().split(' ')))
disX = ln[2] - ln[0]
disY = ln[3] - ln[1]
output=''
u='U'
d='D'
r='R'
l='L'
# 一周め
for i in range(disY):
output+= u
for i in range(disX):
output+= r
for i in range(disY):
output+= d
for i in range(disX):
output+= l
#2週め
output+= l+u
for i in range(... | a.cc:1:3: error: invalid preprocessing directive #back
1 | # back and force
| ^~~~
a.cc:5:8: error: empty character constant
5 | output=''
| ^~
a.cc:10:2: error: extended character is not valid in an identifier
10 | # 一周め
| ^
a.cc:10:2: error: invalid preprocessing directive #\U... |
s198318888 | p03836 | C++ | int hori = abs(sx-tx);
string ans = "";
adder(ans,verti,'U');
adder(ans,hori,'R');
adder(ans,verti,'D');
adder(ans,hori,'L');
adder(ans,1,'L');
adder(ans,verti+1,'U');
adder(ans,hori+1,'R');
adder(ans,1,'D');
adder(ans,1,'R');
adder(ans,verti+1,'D');
adder(ans,hori+1,'L'... | a.cc:1:17: error: 'sx' was not declared in this scope
1 | int hori = abs(sx-tx);
| ^~
a.cc:1:20: error: 'tx' was not declared in this scope
1 | int hori = abs(sx-tx);
| ^~
a.cc:1:13: error: 'abs' was not declared in this scope
1 | int hori = abs(sx-tx);
... |
s792041538 | 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+1);i++)
cout<<"D";
for(int i=0;i<(tx-sx+1);i++)
cout<<"R";... | a.cc: In function 'int main()':
a.cc:6:28: error: expected ';' before ')' token
6 | for(int i=0<i<(tx-sx);i++)
| ^
| ;
|
s814666505 | p03836 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int inf = 1001001001;
void forth(int x, int y, bool grid[2000][2000]){
grid.at(x).at(y) == 0;
if(int x < tx && grid.at(x+1).at(y) == 1){
x++;
cout << 'R' << endl;
return next(x,y);
... | a.cc: In function 'void forth(int, int, bool (*)[2000])':
a.cc:8:8: error: request for member 'at' in 'grid', which is of non-class type 'bool (*)[2000]'
8 | grid.at(x).at(y) == 0;
| ^~
a.cc:9:12: error: expected initializer before '<' token
9 | if(int x < tx && grid.at(x+1).at(y) == 1){
... |
s929971073 | p03836 | C++ | sx, sy, tx, ty = gets.split.map(&:to_i)
a = tx - sx
b = ty - sy
print "U" * b + "R" * a
print "D" * b + "L" * a
print "L" + "U" * (b + 1) + "R" * (a + 1) + "D"
print "R" + "D" * (b + 1) + "L" * (a + 1) + "U" + "\n" | a.cc:1:1: error: 'sx' does not name a type
1 | sx, sy, tx, ty = gets.split.map(&:to_i)
| ^~
|
s277028206 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i,l,r) for(i=l;i<r;i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define P pair<ll,ll>
#define F first
#define S second
signed main(){
ll sx,sy,X,Y,i;
cin>>sx>>sy>>X>>Y;
X-=sx;Y-=sy
REP(i,X)cout<<'R';
REP(i... | a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before 'for'
13 | X-=sx;Y-=sy
| ^
| ;
a.cc:4:35: error: expected ';' before ')' token
4 | #define FOR(i,l,r) for(i=l;i<r;i++)
| ^
a.cc:5:18: note: in expansion of macro ... |
s689200701 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i,l,r) for(i=l;i<r;i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define P pair<ll,ll>
#define F first
#define S second
signed main(){
ll sx,sy,X,Y,i;
cin>>sx>>sy>>X>>Y;
X-=sx;Y-=sy
REP(i,X)cout<<'R';
REP(i... | a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before 'for'
13 | X-=sx;Y-=sy
| ^
| ;
a.cc:4:35: error: expected ';' before ')' token
4 | #define FOR(i,l,r) for(i=l;i<r;i++)
| ^
a.cc:5:18: note: in expansion of macro ... |
s537729309 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i,l,r) for(i=l;i<r;i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define P pair<ll,ll>
#define F first
#define S second
signed main(){
ll sx,sy,X,Y,i;
cin>>sx>>sy>>X>>Y;
X-=sx;Y-=sy
REP(i,X)cout<<'R';
REP(i... | a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before 'for'
13 | X-=sx;Y-=sy
| ^
| ;
a.cc:4:35: error: expected ';' before ')' token
4 | #define FOR(i,l,r) for(i=l;i<r;i++)
| ^
a.cc:5:18: note: in expansion of macro ... |
s876966274 | p03836 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
using namespace std;
using P = pair<int, int>;
const int maplen = 2020;
const int offset = 1010;
string ans = "";
vector<vector<bool>> isvisit(maplen, vector<bool>(maplen, false));
void search(int sx, int sy, int tx, int ty){
... | a.cc: In function 'void search(int, int, int, int)':
a.cc:84:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
84 | int main(){
| ^~
a.cc:84:9: note: remove parentheses to default-initialize a variable
84 | int main(){
| ^~
| --
a... |
s891108293 | p03836 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
int sx,sy,gx,gy;
cin >> sx >> sy >> gx >> gy;
vector<char> a;
for(int i = sx - gx; i != 0; (sx > gx ? i-- : i++)){
a.emplace_back(sx > gx ? 'L' : 'R');
if(sx > gx)
a.emplace_back('L');
else if(sx < ... | a.cc: In function 'int main()':
a.cc:56:24: error: expected ';' before 'else'
56 | a.emplace_back('L')
| ^
| ;
57 | else if(sx < gx)
| ~~~~
|
s113681938 | p03836 | C++ | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pll pair<ll,ll>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,... | a.cc: In function 'int main()':
a.cc:53:20: error: expected ';' before '}' token
53 | cout << 'L'
| ^
| ;
54 | }
| ~
|
s786896331 | p03836 | C++ | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pll pair<ll,ll>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,... | a.cc: In function 'int main()':
a.cc:32:9: error: 'i' was not declared in this scope
32 | reo(i,w){
| ^
a.cc:32:5: error: 'reo' was not declared in this scope; did you mean 'rep'?
32 | reo(i,w){
| ^~~
| rep
a.cc:53:20: error: expected ';' before '}' token
53 | ... |
s413641167 | p03836 | C++ | using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Text;
class Program
{
static void Main(string[] args)
{
// 入力
//var s = Console.ReadLine();
//var n = int.Parse(Console.ReadLine());
int[] n = Console.ReadLine().Split().Se... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Linq;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Collections;
... |
s532052477 | p03836 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define coR() cout << 'R'
#define coL() cout << 'L'
#define coU() cout << 'U'
#define coD() cout << 'D'
using namespace std;
int main(){
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int distx = tx - sx;
int disty = tx - sx;
rep(i,distx)... | a.cc: In function 'int main()':
a.cc:24:9: error: expected '}' at end of input
24 | coR();
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s167708922 | p03836 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define co('a') cout << 'a' << endl
using namespace std;
int main(){
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int distx = tx - sx;
int disty = tx - sx;
rep(i,distx){ co(R); }
rep(i,disty){ co(U); }
rep(i,distx){ co(L); }
rep(i... | a.cc:3:12: error: expected parameter name, found "'a'"
3 | #define co('a') cout << 'a' << endl
| ^~~
a.cc: In function 'int main()':
a.cc:11:20: error: 'R' was not declared in this scope
11 | rep(i,distx){ co(R); }
| ^
a.cc:11:17: error: 'co' was not declared in this s... |
s077291062 | p03836 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define co(a) cout << a << endl
using namespace std;
int main(){
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
distx = tx - sx;
disty = tx - sx;
rep(i,distx){ co(R); }
rep(i,disty){ co(U); }
rep(i,distx){ co(L); }
rep(i,disty+1){ c... | a.cc: In function 'int main()':
a.cc:8:3: error: 'distx' was not declared in this scope
8 | distx = tx - sx;
| ^~~~~
a.cc:9:3: error: 'disty' was not declared in this scope
9 | disty = tx - sx;
| ^~~~~
a.cc:11:20: error: 'R' was not declared in this scope
11 | rep(i,distx){ co(R); }
... |
s327529738 | p03836 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
usi... | a.cc: In function 'int main()':
a.cc:45:11: error: expected ';' before 'cout'
45 | t += 'R'
| ^
| ;
46 | cout << t << endl;
| ~~~~
|
s541546518 | p03836 | C++ | #define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0;i < (n);i++)
#define all(v) v.begin(),v.end()
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using vvl = vector<vl>;
int main(){
ll sx,sy,tx,ty; cin >> sx >> sy >> tx >> ty;
ll dx = tx-sx; ll d... | a.cc: In function 'int main()':
a.cc:18:8: error: expected primary-expression before '<<' token
18 | << string(dy+1,'U') << 'L' << 'U' << string(dx+1,'L')
| ^~
|
s809102896 | p03836 | C++ | #include<bits/stdc++.h>
#include<iomanip>
using namespace std;
typedef long long ll;
typedef long l;
typedef pair<int,int> P;
#define rep(i,n) for(int i=0;i<n;i++)
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
const double PI=3.141... | a.cc: In function 'int main()':
a.cc:28:12: error: expected ';' before 'for'
28 | cout<<"D"
| ^
| ;
a.cc:29:7: error: 'i' was not declared in this scope
29 | rep(i,tx-sx+1) cout<<"R";
| ^
a.cc:7:30: note: in definition of macro 'rep'
7 | #define rep(i,n) for(i... |
s595205726 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
#define int int64
#define rep(i, n) for(int i=0; i<n; i++)
#define FOR(i, a, b) for(int i=a; i<b; i++)
#define SORT(x) sort(x.begin(), x.end())
#define GSORT(x) sort(x.begin(), x.end(), greater<int>())
#define mk make_pair
#define fi first
#define s... | a.cc: In function 'int main()':
a.cc:44:17: error: 'y' was not declared in this scope
44 | y++;
| ^
a.cc:52:17: error: 'x' was not declared in this scope
52 | x++;
| ^
|
s165871872 | p03836 | Java | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scanner = new Scanner(System.in);
int sx = scanner.nextInt();
int sy = scanner.nextInt();
int tx = scanner.nextInt();
int ty = scanner.... | Main.java:24: error: ';' expected
sb.append("U")
^
1 error
|
s273140482 | p03836 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,aa,bb; cin >> a >> b >> aa >> bb;
int x = aa - a;
int y = bb - b;
int signx , signy = 0;0;
if(x<0){
signx = -1;
}
else{
signx = 1;
}
if(y<0){
signy = -1;
}
else{
signy = 1
}
int countx,county = 0;0;
while... | a.cc: In function 'int main()':
a.cc:21:14: error: expected ';' before '}' token
21 | signy = 1
| ^
| ;
22 | }
| ~
|
s656437499 | p03836 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,aa,bb; cin >> a >> b >> aa >> bb;
int x = aa - a;
int y = bb - b;
int signx , signy = 0,0;
if(x<0){
signx = -1;
}
else{
signx = 1;
}
if(y<0){
signy = -1;
}
else{
signy = 1
}
int countx,county = 0,0;
while... | a.cc: In function 'int main()':
a.cc:9:25: error: expected unqualified-id before numeric constant
9 | int signx , signy = 0,0;
| ^
a.cc:21:14: error: expected ';' before '}' token
21 | signy = 1
| ^
| ;
22 | }
| ~
a... |
s458168853 | p03836 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,aa,bb; cin >> a >> b >> aa >> bb;
int x = aa - a;
int y = bb - b;
if(x<0){
signx = -1;
}
else{
signx = 1;
}
if(y<0){
signy = -1;
}
else{
signy = 1
}
int countx,county = 0,0;
while(x!=0){
if(x<0){
cou... | a.cc: In function 'int main()':
a.cc:9:5: error: 'signx' was not declared in this scope
9 | signx = -1;
| ^~~~~
a.cc:12:5: error: 'signx' was not declared in this scope
12 | signx = 1;
| ^~~~~
a.cc:16:5: error: 'signy' was not declared in this scope
16 | signy = -1;
| ... |
s431072549 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int xx = tx - sx;
int yy = ty - sy;
string rz = "";
string lz = "";
for (int i = 0; i < xx; i++) {
rz += "R";
lz += "L";
}
string dz = "";
string uz = "";
for (int i = 0; i < yy; i++) {
dz += "D"... | a.cc: In function 'int main()':
a.cc:24:1: error: expected ',' or ';' before 'cout'
24 | cout << firs + secon << endl;
| ^~~~
|
s828365712 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int xx = tx - sx;
int yy = ty - sy;
string one = "U" * yy + "R" * xx;
string two = "D" * yy + "L" * xx;
string three = "D" + "R" * (xx + 1) + "U" * (yy + 1) + "L";
string four = "U" + "L" * (xx + 1) ... | a.cc: In function 'int main()':
a.cc:8:20: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
8 | string one = "U" * yy + "R" * xx;
| ~~~ ^ ~~
| | |
| | int
| const char [2]
a.cc:8:31: error:... |
s945497471 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
string add_root(string root, string direct, int count) {
for (int i < 0; i < count; i++) {
root = root + direct;
}
return root;
}
int main() {
int sx, sy, tx, ty;
cin >> sx >> sy >> tx >> ty;
int dx = tx - sx, dy = ty - sy;
string r;
r = add_root(r, "... | a.cc: In function 'std::string add_root(std::string, std::string, int)':
a.cc:5:13: error: expected ';' before '<' token
5 | for (int i < 0; i < count; i++) {
| ^~
| ;
a.cc:5:14: error: expected primary-expression before '<' token
5 | for (int i < 0; i < count; i++) {
... |
s798343515 | p03836 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int main() {
int sx, sy, tx, ty;
cin >> sx >> sy >> tx >> ty;
int dx = tx - sx;
int dy = ty - sy;
string outstr = str(dy, 'U') + str(dx, 'R') + str(dy, 'D') + str(dx, 'L');
outstr += 'L' + str(dy + 1, '... | a.cc: In function 'int main()':
a.cc:15:19: error: 'str' was not declared in this scope; did you mean 'std'?
15 | string outstr = str(dy, 'U') + str(dx, 'R') + str(dy, 'D') + str(dx, 'L');
| ^~~
| std
|
s532585685 | p03836 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int main() {
int sx, sy, tx, ty;
cin >> sx >> sy >> tx >> ty;
int dx = tx - sx;
int dy = ty - sy;
string outstr = 'U' * dy + 'R' * dx + 'D' * dy + 'L' * dx;
outstr += 'L' + 'U' * (dy + 1) + 'R' * (dx + ... | a.cc: In function 'int main()':
a.cc:15:50: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
15 | string outstr = 'U' * dy + 'R' * dx + 'D' * dy + 'L' * dx;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
|
s417139944 | p03836 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main() {
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int dx = abs(tx-sx);
int dy = abs(ty-sy);
const char* rightup = "URDLDRULULDR";
const char* leftdown = "DLURRDLULURD";
const char* ans;
if(tx > sx) ans = rightup;... | a.cc: In function 'int main()':
a.cc:20:43: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
20 | for(int i = 0; i < dx; i++) printf(ans[0]);
| ~~~~~^
| |
| ... |
s002449620 | p03836 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main() {
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int dx = abs(tx-sx);
int dy = abs(ty-sy);
char* rightup = "URDLDRULULDR";
char* leftdown = "DLURRDLULURD";
char* ans;
if(tx > sx) ans = rightup;
else ans = lef... | a.cc: In function 'int main()':
a.cc:13:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
13 | char* rightup = "URDLDRULULDR";
| ^~~~~~~~~~~~~~
a.cc:14:20: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
14 | char*... |
s502434870 | p03836 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main() {
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int dx = abs(tx-sx);
int dy = abs(ty-sy);
char rightup[] = ['U','R','D','L','D','R','U','L','U','L','D','R'];
char leftdown[] = ['D','L','U','R','R','D','L','U','L','U',... | a.cc: In function 'int main()':
a.cc:13:21: error: expected identifier before 'U'
13 | char rightup[] = ['U','R','D','L','D','R','U','L','U','L','D','R'];
| ^~~
a.cc:13:24: error: expected ']' before ',' token
13 | char rightup[] = ['U','R','D','L','D','R','U','L','U','L','D','R'];
... |
s710470264 | p03836 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main() {
int sx,sy,tx,ty;
cin >> sx >> sy >> tx >> ty;
int dx = abs(tx-sx);
int dy = abs(ty-sy);
char[] rightup = ['U','R','D','L','D','R','U','L','U','L','D','R'];
char[] leftdown = ['D','L','U','R','R','D','L','U','L','U',... | a.cc: In function 'int main()':
a.cc:13:7: error: structured binding declaration cannot have type 'char'
13 | char[] rightup = ['U','R','D','L','D','R','U','L','U','L','D','R'];
| ^~
a.cc:13:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:7: error: empty structured... |
s669949651 | p03836 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
typedef long long ll;
const ll MOD=1000000007;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class ... | a.cc:26:19: error: extended character ’ is not valid in an identifier
26 | cout << string(dy,’U’) << string(dx,’R’);
| ^
a.cc:26:19: error: extended character ’ is not valid in an identifier
a.cc:26:37: error: extended character ’ is not valid in an identifier
26 | cout << string(dy,’U’) <... |
s944804431 | p03836 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
typedef long long ll;
const ll MOD=1000000007;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class ... | a.cc:26:19: error: extended character ’ is not valid in an identifier
26 | cout << string(dy,’U’) << string(dx,’R’);
| ^
a.cc:26:19: error: extended character ’ is not valid in an identifier
a.cc:26:37: error: extended character ’ is not valid in an identifier
26 | cout << string(dy,’U’) <... |
s255649608 | 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’) << ’D’;
... | a.cc:10:19: error: extended character ’ is not valid in an identifier
10 | cout << string(dy,’U’) << string(dx,’R’);
| ^
a.cc:10:19: error: extended character ’ is not valid in an identifier
a.cc:10:37: error: extended character ’ is not valid in an identifier
10 | cout << string(dy,’U’) <... |
s529562806 | 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’) << ’D’;
... | a.cc:10:19: error: extended character ’ is not valid in an identifier
10 | cout << string(dy,’U’) << string(dx,’R’);
| ^
a.cc:10:19: error: extended character ’ is not valid in an identifier
a.cc:10:37: error: extended character ’ is not valid in an identifier
10 | cout << string(dy,’U’) <... |
s149362281 | p03836 | C++ | #include <bits/stdc++.h>
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 << ’... | a.cc:9:19: error: extended character ’ is not valid in an identifier
9 | cout << string(dy,’U’) << string(dx,’R’);
| ^
a.cc:9:19: error: extended character ’ is not valid in an identifier
a.cc:9:37: error: extended character ’ is not valid in an identifier
9 | cout << string(dy,’U’) << s... |
s487386728 | 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: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’) <... |
s180189297 | p03836 | C++ | #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;
rep(i, dx) {
cout << "R";
}
rep(i, dy) {
cout << "U";
}
rep(i, dx) {
cout << "L";
}
rep(i, dy) {
cout << "D";
}
}
| a.cc: In function 'int main()':
a.cc:11:7: error: 'i' was not declared in this scope
11 | rep(i, dx) {
| ^
a.cc:11:3: error: 'rep' was not declared in this scope
11 | rep(i, dx) {
| ^~~
|
s672898611 | p03836 | C++ | #include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),... | a.cc: In function 'int main()':
a.cc:53:9: error: 'ts' was not declared in this scope; did you mean 'ty'?
53 | rep(i,ts-sx+1){
| ^~
a.cc:7:39: note: in definition of macro 'rep'
7 | #define rep(i, n) for (ll i = 0; i < (n); i++)
| ^
a.cc:61:9: error: 't... |
s230065510 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define reps(i, n) for (int i = (a); i < (n); ++i)
#define int long long
int main(){
int s1, s2, t1, t2;
cin << s1 << s2 << t1 << t2;
string S;
}
| cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:9:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'long long int')
9 | cin << s1 << s2 << t1 << t2;
| ~~~ ^~ ~~
| | |
| | long long int
... |
s248657060 | p03836 | C | #include<stdio.h>
int main(void){
int sx,sy,tx,ty,i,x,y;
scanf("%d%d%d%d",&sx,&sy,&tx,&ty);
x=tx-sx;
y=ty-sy;
for(i=1;i<=y;i++){
printf("U");//一回目行きy
}
for(i=1;i<=x;i++)
printf("R");//一回目行きx
}
for(i=1;i<=y;i++)
printf("D");//一回目帰りy
}
for(i=1;i<=x;i++)
printf("L");//一回目帰りx
}
//二回目行き
printf("L");
... | main.c:13:1: error: expected identifier or '(' before 'for'
13 | for(i=1;i<=y;i++)
| ^~~
main.c:13:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
13 | for(i=1;i<=y;i++)
| ^~
main.c:13:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
... |
s959287190 | p03836 | C++ | #include<bits/stdc++.h>
using namespace std;
bool check(int nx, int ny, vector<pair<int, int> >vis)
{
for(int i = 0; i < vis.size(); i++)
{
if(nx == v[i].first && ny == v[i].second)
return true;
}
return false;
}
void fun(queue<pair<int, int> > &q, int sx, int sy, int tx, int ty, vector<pa... | a.cc: In function 'bool check(int, int, std::vector<std::pair<int, int> >)':
a.cc:8:18: error: 'v' was not declared in this scope
8 | if(nx == v[i].first && ny == v[i].second)
| ^
a.cc: In function 'void fun(std::queue<std::pair<int, int> >&, int, int, int, int, std::vector<std::pair<... |
s243908281 | p03836 | C++ | #include<bits/stdc++.h>
using namespace std;
bool check(int nx, int ny, vector<pair<int, int> >vis)
{
for(int i = 0; i < vis.size(); i++)
{
if(nx == v[i].first && ny == v[i].second)
return true;
}
return false;
}
void fun(queue<pair<int, int> > &q, int sx, int sy, int tx, int ty, vector<pa... | a.cc: In function 'bool check(int, int, std::vector<std::pair<int, int> >)':
a.cc:8:18: error: 'v' was not declared in this scope
8 | if(nx == v[i].first && ny == v[i].second)
| ^
a.cc: In function 'void fun(std::queue<std::pair<int, int> >&, int, int, int, int, std::vector<std::pair<... |
s481253552 | p03836 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int main(){
int sx,sy,tx,ty;
cin>>sx>>sy>>tx>>ty;
rep(i,ty-tx){
cout<<'U';
}
rep(i,tx-sx){
cout<<'R';
}
rep(i,ty-tx){
cout<<'D';
}
rep(i,tx-sx){
cout<<'... | a.cc: In function 'int main()':
a.cc:29:13: error: expected ';' before 'for'
29 | cout<<"DR"
| ^
| ;
a.cc:30:7: error: 'i' was not declared in this scope
30 | rep(i,ty-tx){
| ^
a.cc:2:30: note: in definition of macro 'rep'
2 | #define rep(i,n) for(int i=0;i<... |
s804182323 | p03836 | C++ | #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+1,’R’) << ’D’;
cout << ’R’ << string(dy+1,’D’) ... | 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... |
s102754023 | p03836 | C++ | //おまじないc++
//おまじないc++
#include <iostream>
#include<cmath>
#include<vector>
#include <algorithm>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
int main() {
int main() {
int sx,sy,tx,ty;
cin>>sx>>sy>>tx>>ty;
int dx=tx-sx;
int dy=ty-sy;
fo... | a.cc: In function 'int main()':
a.cc:13:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
13 | int main() {
| ^~
a.cc:13:9: note: remove parentheses to default-initialize a variable
13 | int main() {
| ^~
| --
a.cc:13:9: note: or ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.