submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s481963794 | p03836 | C++ | #include<iostream>
using namespace std;
int main()
{
int sx,sy,tx,ty;
cin>>sx>>sy>>tx>>ty;
int l=tx-sx, h=ty-sy, i, j, k=0;
for (i=0; i<h; i++)
{
a[k++]='U';
}
for (j=0; j<l; j++)
{
a[k++]='R';
}
for (i=0; i<h; i++)
{
a[k++]='D';
}
for (j... | a.cc: In function 'int main()':
a.cc:12:9: error: 'a' was not declared in this scope
12 | a[k++]='U';
| ^
a.cc:16:9: error: 'a' was not declared in this scope
16 | a[k++]='R';
| ^
a.cc:20:9: error: 'a' was not declared in this scope
20 | a[k++]='D';
| ... |
s148637336 | p03836 | C++ | #include<isotream>
#include<algorithm>
using namespace std;
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 < ty;i++)cout << "U";
for(int i = tx;i > sx;i--)cout << "L";
for(int i = ty;i > sy;i--)cout << "D";
cout << "D";
for(int i = sx;... | a.cc:1:9: fatal error: isotream: No such file or directory
1 | #include<isotream>
| ^~~~~~~~~~
compilation terminated.
|
s625716986 | p03836 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n;i++)
using namespace std;
typedef pair<int,int> pii;
int INF=1e9;
string ans;
int dx[]={0,0,1,-1};
int dy[]={1,-1,0,0};
bool inrange(int y,int x){return (0<=x&&x<=2000&&0<=y&&y<=2000);}
vector<vector<bool>>flag(2001,vector<bool>(2001,true));
int mini;
pii _start... | a.cc: In function 'bool dfs(pii, int, std::string)':
a.cc:16:28: error: reference to 'visit' is ambiguous
16 | if(d==mini&&now==_end&&visit){
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/var... |
s301502939 | p03836 | Java | import java.util.*;
public class c{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
int sx = Integer.parseInt(sc.next());
int sy = Integer.parseInt(sc.next());
int tx = Integer.parseInt(sc.ne... | Main.java:2: error: class c is public, should be declared in a file named c.java
public class c{
^
1 error
|
s571133005 | p03836 | Java | import java.util.*;
public class Main{
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
int sx = Integer.parseInt(sc.next());
int sy = Integer.parseInt(sc.next());
int tx = Integer.parseInt(sc.next());
int ty = Integer.... | Main.java:11: error: illegal start of type
for(int i = 0; i < dx; i++){
^
Main.java:11: error: > or ',' expected
for(int i = 0; i < dx; i++){
^
Main.java:11: error: <identifier> expected
for(int i = 0; i < dx; i++){
^
Main.java... |
s754884925 | p03836 | C++ | #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <set>
#include <map>
#include <deque>
#define WMAX 10000
#define HMAX 10000
//コメントアウトするとdebug()を実行しない
#define DEBUG
using namespace std;
t... | a.cc: In function 'void answer()':
a.cc:42:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
42 | cout << ans << "\n";
| ^~~
| abs
|
s696860933 | p03836 | C++ | #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <set>
#include <map>
#include <deque>
#define WMAX 10000
#define HMAX 10000
//コメントアウトするとdebug()を実行しない
#define DEBUG
using namespace std;
t... | a.cc:64:17: warning: multi-character character constant [-Wmultichar]
64 | cout << 'UL';
| ^~~~
a.cc: In function 'void answer()':
a.cc:42:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
42 | cout << ans << "\n";
| ^~~
| ... |
s790779956 | p03836 | C++ | #include <iostream>
using namespace std;
int sx,sy,tx,ty;
int main(){
cin >> sx >> sy >> tx >> ty;
for(int y = sy; y < ty; y++){
cout << "U";
}
for(int x = sx; x < tx; x++){
cout << "R";
for(int y = ty; y > sy; y--){
cout << "D";
}
for(int x = tx; x > sx; x--)... | a.cc: In function 'int main()':
a.cc:48:2: error: expected '}' at end of input
48 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s629428643 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
int x1,y1,x2,y2;
int main()
{
while (~scanf("%d%d%d%d",&x1,&y1,&x2,&y2)){
int c1=x2-x1;
int c2=y2-y1;
for (int i=0;i<c2;++i)
printf("U");
for (int i=0;i<c1;++i)
printf("R");
for (int i=0;i<c2;++i)
... | a.cc:4:8: error: 'int y1' redeclared as different kind of entity
4 | int x1,y1,x2,y2;
| ^~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,... |
s980478628 | p03836 | C++ | #include <stdio.h>
#include <stdlib.h>
int map[2001][2001];
struct point {
int x;
int y;
};
struct point target;
//functions
int equalPoint(struct point p1, struct point p2);
struct point intoMap(int x, int y);
void rooting(struct point p1, struct point p2, int **map);
struct point getFree(int sx, int sy, struct ... | a.cc: In function 'int main()':
a.cc:20:21: error: invalid conversion from 'void*' to 'int**' [-fpermissive]
20 | int **map = malloc(sizeof(int*)*2001);
| ~~~~~~^~~~~~~~~~~~~~~~~~~
| |
| void*
a.cc:28:20: error: invalid conversion from 'void*'... |
s365328966 | p03836 | C | #include<stdio.h>
#include<string.h>
int main(){
int sx,sy,tx,ty,x,y,i;
char S[4000];
char a[1000] ="R";
char b[1000]="L";
char c[1000]="DRRR";
char d[1000]="ULLL";
scanf("%d %d %d %d",sx,sy,tx,ty);
x=tx-sx,y=ty-sy;
if(x>=2)
{
for(i=1;i<=x-1;i++)
{
strcat(a,"R");
strcat(b,"L");
strcat(c,"R");
... | main.c: In function 'main':
main.c:38:10: error: assignment to expression with array type
38 | S=a;
| ^
main.c:43:21: error: 's' undeclared (first use in this function)
43 | printf("%s",s);
| ^
main.c:43:21: note: each undeclared identifier is reported only... |
s207808463 | p03836 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define dist(u,v) ((abs(u.x-v.x) + abs(u.y-v.y)))
#define eql(u,v) (u.x == v.x && v.y == u.y)
#define validV(u) (abs(u.x) <= 2000 && abs(u.y) <= 2000)
typedef struct _pair{
int x, y, d;
}pair;
void go(pair orig, pair u, pair dest);
int... | main.c: In function 'main':
main.c:33:26: error: expected ';' before 'i'
33 | for ( i = 0; i < 2001 i++) {
| ^~
| ;
|
s720130018 | p03836 | C++ | #define SORT(v) sort(v.begin(), v.end())
#include "iostream"
#include "map"
#include "vector"
#include <stack>
#include "cstdlib"
#include <algorithm>
#include <cstdarg>
#include "ane.cpp"
#define INF (int)1e9
#define NMAX 200
#define MMAX 200
#define MOD 100000
using namespace std;
// コメントアウトするとdb_printf()を実行しない
#de... | a.cc:9:10: fatal error: ane.cpp: No such file or directory
9 | #include "ane.cpp"
| ^~~~~~~~~
compilation terminated.
|
s429356801 | p03836 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new Strin... | Main.java:34: error: ';' expected
sb.append(sbx.toString()).append(sby.toString())
^
1 error
|
s757829013 | p03836 | C++ | はろー | a.cc:1:1: error: '\U0000306f\U0000308d\U000030fc' does not name a type
1 | はろー
| ^~~~~~
|
s127239907 | p03836 | C | //Date:06-01-17
#include<stdio.h>
#include<string.h>
#include<assert.h>
#include<stdlib.h>
#include<stdbool.h>
#include<float.h>
#include<math.h>
#include<ctype.h>
#include<limits.h>
#include<time.h>
#define ll long long
#define For(i,n) for(i=0;i<n;i++)
#define rep(i ,a ,b) for(i=(a);i<=(b);i++)
#define mset(a ,valu... | main.c:25:1: error: return type defaults to 'int' [-Wimplicit-int]
25 | main(){
| ^~~~
main.c:46:15: error: expected declaration specifiers or '...' before string constant
46 | scanf("%d %d" ,&k ,&s);
| ^~~~~~~
main.c:46:24: error: expected declaration specifiers or '...' before ... |
s763801879 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int sx,sy,tx,ty,i;
cin>>sx>>sy>>tx>>ty;
xsa=tx-sx;
ysa=ty-sy;
for(i=0; i<ysa; i++){
cout<<'U';
}
for(i=0;i<xsa; i++){
cout<<'R';
}
for(i=0; i<ysa; i++){
cout<<'D';
}
for(i=0; i<=xsa; i++){
cout<<'L';
}
for(i=0; i<=ysa; i... | a.cc: In function 'int main()':
a.cc:6:3: error: 'xsa' was not declared in this scope
6 | xsa=tx-sx;
| ^~~
a.cc:7:3: error: 'ysa' was not declared in this scope
7 | ysa=ty-sy;
| ^~~
a.cc:33:7: error: expected ';' before 'U'
33 | cout'U';
| ^~~
| ;
|
s779285165 | p03836 | C | #include <stdio.h>
#define printCN(c, n) { while(n>0){ putchar(c); n--; } }
int main()
{
int sx, sy, tx, ty;
scanf("%d%d%d%d", &sx, &sy, &tx, &ty);
printCN('U', ty-sy);
printCN('R', tx-sx);
printCN('D', ty-sy);
printCN('L', tx-sx);
putchar('L');
printCN('U', ty-sy+1);
printCN('R', tx-sx+1);
putchar('D');
... | main.c: In function 'main':
main.c:3:50: error: lvalue required as decrement operand
3 | #define printCN(c, n) { while(n>0){ putchar(c); n--; } }
| ^~
main.c:16:2: note: in expansion of macro 'printCN'
16 | printCN('U', ty-sy+1);
| ^~~~~~~
main.c:3:5... |
s320965318 | p03836 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 0;
pair < int , int > start;
pair < int , int > end;
int vis[2017][2017];
int dr[4] = { 1 , 0 , -1 , 0 };
int dc[4] = { 0 , 1 , 0 , -1 };
int flag = 0;
string one,two,three,four;
int bfs()
{
queue < pair < pair < int , int > , string > > q;
q.push(make_pa... | a.cc: In function 'int bfs()':
a.cc:22:29: error: reference to 'end' is ambiguous
22 | if(u.first==end)
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/valarray:1265:5: note: candid... |
s992637284 | p03836 | C | #include<stdio.h>
int main(){
int x,y,sx,sy,tx,ty,i;
scanf("%d %d %d %d",&sx,&xy,&tx,&ty);
x=tx-sx;
y=ty-sy;
for(i=0;i<x;i++) printf("U");
for(i=0;i<y;i++) printf("R");
for(i=0;i<x;i++) printf("D");
for(i=0;i<=y;i++) printf("L");
for(i=0;i<=x;i++) printf("U");
for(i=0;i<=y;i++) printf("R");
printf("DR");
f... | main.c: In function 'main':
main.c:5:34: error: 'xy' undeclared (first use in this function); did you mean 'ty'?
5 | scanf("%d %d %d %d",&sx,&xy,&tx,&ty);
| ^~
| ty
main.c:5:34: note: each undeclared identifier is reported only on... |
s587393872 | p03836 | Java | public class Main {
public static void main(String[] args) {
int sx, sy, tx, ty;
Scanner s = new Scanner(System.in);
sx = s.nextInt();
sy = s.nextInt();
tx = s.nextInt();
ty = s.nextInt();
int i;
for (i = 0; i < ty - sy; i++) {
System.out... | Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s420367235 | p03836 | C | $/=' ';a,b,c,d=$<.map &:to_i;x=c-a;y=d-b;puts ?U*y+?R*x+?D*(y+=1)+?L*(x+=1)+?U*y+?R*x+?D+?R+?D*y+?L*x+?U | main.c:1:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before '/=' token
1 | $/=' ';a,b,c,d=$<.map &:to_i;x=c-a;y=d-b;puts ?U*y+?R*x+?D*(y+=1)+?L*(x+=1)+?U*y+?R*x+?D+?R+?D*y+?L*x+?U
| ^~
main.c:1:8: warning: data definition has no type or storage class
1 | $/=' ';a,b,c,d=$<.map &:to_i;x=c-a;... |
s806166844 | p03836 | C++ | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#include <bitset>
#include <map>
#define INF_LL 9000000000000000000
#define INF 2000000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = ... | a.cc: In function 'int main()':
a.cc:69:9: error: 'memset' was not declared in this scope
69 | memset(visited, 0, sizeof visited);
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include <map>
+++ |+#include... |
s494775905 | p03837 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define se second
#define fi first
#define mp make_pair
#define pb push_back
#define ll long long
const int MAXN = (int)1e7 + 1000;
const int N = 105;
const int mod = (int)1e9 + 7;
const int INF = (int)1e9;
int d[N][N];
struct edge{
int u,v,c;
};
ed... | a.cc: In function 'int main()':
a.cc:44:20: error: no match for 'operator=' (operand types are 'edge' and 'const int')
44 | e[i] = INF;
| ^~~
a.cc:14:8: note: candidate: 'constexpr edge& edge::operator=(const edge&)'
14 | struct edge{
| ^~~~
a.cc:14:8: note: no ... |
s862777445 | p03837 | C++ | #include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define ll long long
#define ld long double
#define rep(i, n) for(ll i = 0; i < n; ++i)
#define rep2(i, a, b) for(ll i = a; i <= b; ++i)
#define rrep(i, a, b) for(ll i = a; i >= b; --i)
#define pii pai... | a.cc: In function 'int main()':
a.cc:65:22: error: cannot convert 'std::vector<int>' to 'int' in assignment
65 | dist[a[i]][b[i]]=c;
| ^
| |
| std::vector<int>
a.cc:66:22: error: cannot convert 'std::vector<int>' to 'int' in assignm... |
s467744565 | p03837 | C++ | #include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define ll long long
#define ld long double
#define rep(i, n) for(ll i = 0; i < n; ++i)
#define rep2(i, a, b) for(ll i = a; i <= b; ++i)
#define rrep(i, a, b) for(ll i = a; i >= b; --i)
#define pii pai... | a.cc: In function 'int main()':
a.cc:61:14: error: 'i' was not declared in this scope
61 | cin >> a[i] >> b[i] >> c[i];
| ^
|
s942034081 | p03837 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> ii;
#define DEBUG freopen("in.txt", "r", stdin);
struct fastio {
fastio() {
ios::sync_with_stdio(false);
cout << setprecision(10) << fixed;
cin.tie(0);
}
};
fastio _fast_io;
const int N = 1... | a.cc:25:13: error: non-local lambda expression cannot have a capture-default
25 | auto cmp = [&](int a, int b){
| ^
|
s195226420 | p03837 | C++ | #include <iostream>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <cctype>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <stdlib.h>
#include <tuple>
#include <iomanip>
#include <iterator>
#include <stdio.h>
#include <fstream>
#include <t... | a.cc: In function 'int main()':
a.cc:230:23: error: 'INT_MAX' was not declared in this scope
230 | d[i][j] = INT_MAX;
| ^~~~~~~
a.cc:22:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
21 | #include <cstdint>
+++ ... |
s460489264 | p03837 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define MOD 998244353
template<class T>inline bool chmax(T& a,T b){if (a<b){a=b;return 1;}return 0;}
template<class T>inline bool chmin(T& a,T b){if (a>b){a=b;return 1;}return 0;}
const long long INF = 1LL << 60;
bool pairCo... | a.cc: In function 'int main()':
a.cc:82:84: error: no match for 'operator[]' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<edge>, edge>::value_type' {aka 'edge'} and 'll' {aka 'long long int'})
82 | if (cost[j][dist[i].from]+dist[i].cost+cost[dist[i].to][j]==dist[i][j]){
| ... |
s549972919 | p03837 | C++ | /*input
3 3
1 2 1
1 3 1
2 3 3
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define A... | /tmp/ccJuXzPg.o: in function `main':
a.cc:(.text+0x1f7): relocation truncated to fit: R_X86_64_PC32 against symbol `edge' defined in .bss section in /tmp/ccJuXzPg.o
a.cc:(.text+0x398): relocation truncated to fit: R_X86_64_PC32 against symbol `edge' defined in .bss section in /tmp/ccJuXzPg.o
/tmp/ccJuXzPg.o: in functio... |
s342017529 | p03837 | C++ | #include <bits/stdc++.h>
#include <type_traits>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define ddrep(i, n) for (int i = n; i > 0; --i)
#define srep(i, s, t) for (in... | In file included from /usr/include/c++/14/set:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
from a.cc:1:
/usr/include/c++/14/bits/stl_set.h: In instantiation of 'void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = int;... |
s509089119 | p03837 | C++ | #include<cstdio>
#include<algorithm>
int g[101][101],a[1000],b[1000],c[1000];
int const infty=10000000;
int main(){
int n,m,answer=0;
scanf("%d%d",&n,&m);
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++){
g[i][j]=infty;
}
}
for(int i=0;i<m;i++){
// コピペでfastest取ったら嫌なので
cin >> a[i] >> b[i] >> c[i]... | a.cc: In function 'int main()':
a.cc:15:3: error: 'cin' was not declared in this scope
15 | cin >> a[i] >> b[i] >> c[i];
| ^~~
|
s238033669 | p03837 | C++ | 2 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 2
| ^
|
s654439429 | p03837 | C++ | #define int long long
using namespace std;
const int MOD = 1000000007;
const int INF = 1e15;
using Graph = vector<vector<int>>;
signed main(){
int N, M;
cin >> N >> M;
vector<vector<int>> G(N, vector<int>(N, INF));
vector<pair<int, int>> E(M);
for( int i = 0; i < N; i++ ) G.at(i).at(i) = 0;
for( int i = 0... | a.cc:5:15: error: 'vector' does not name a type
5 | using Graph = vector<vector<int>>;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
9 | cin >> N >> M;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is proba... |
s842256598 | p03837 | C++ | #define int long long
using namespace std;
const int MOD = 1000000007;
const int INF = 1e15;
using Graph = vector<vector<int>>;
signed main(){
int N, M;
cin >> N >> M;
vector<vector<int>> G(N, vector<int>(N, INF));
vector<pair<int, int>> E(M);
for( int i = 0; i < N; i++ ) G.at(i).at(i) = 0;
for( int i = 0... | a.cc:5:15: error: 'vector' does not name a type
5 | using Graph = vector<vector<int>>;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
9 | cin >> N >> M;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is proba... |
s319525032 | p03837 | C++ | #include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
using namespace std;
const long long int INF = 1e18;
const long long int mod = 1e9+7;
typedef pair<ll, ll> pairs;
typedef vector<pairs> p;
struct Edge{
ll to, weight;
Edge(ll t, ll w) : to(t), weight(w){}
};
using graph = vector<vector... | a.cc: In function 'int main()':
a.cc:74:35: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}[__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}]' for array subscript
74 | g[a[i]][... |
s124920453 | p03837 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <ctime>
#include <cmath>
#include <string>
#include <stdlib.h>
#include <fstream>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <iterator>
#include <iomanip>
#include <climits>
using namespace std;
long long... | a.cc: In function 'void dijkstra(long long int)':
a.cc:46:11: error: request for member 'insert' in 's', which is of non-class type 'long long int'
46 | s.insert({a, b});
| ^~~~~~
a.cc: In function 'int main()':
a.cc:64:17: error: 's' was not declared in this scope
64 | cout << m - s.s... |
s528262012 | p03837 | C++ | #include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
using P = pair<int, int>;
const long long INF = 100000000;
//ダイクストラ法の練習
int main(){
int N,M;
cin >> N >> M;
vector<vector<int>> edge(101, vector<int> (0));
vector<vector<int>> L(101, vector<int> (101) );
rep(i, M){
... | a.cc: In function 'int main()':
a.cc:26:3: error: expected ',' or ';' before 'for'
26 | for(int i = 1; i < N; i++){
| ^~~
a.cc:26:18: error: 'i' was not declared in this scope
26 | for(int i = 1; i < N; i++){
| ^
|
s568630275 | p03837 | Java | import java.util.Scanner;
public class CandidatesOfNoShortestPaths {
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int num_vertex=scan.nextInt();
int num_edge=scan.nextInt();
int[] a=new int[num_edge];
int[] b=new int[num_edge];
int[] c=... | Main.java:2: error: class CandidatesOfNoShortestPaths is public, should be declared in a file named CandidatesOfNoShortestPaths.java
public class CandidatesOfNoShortestPaths {
^
1 error
|
s835994416 | p03837 | Java | import java.util.Scanner;
public class CandidatesOfNoShortestPaths {
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int num_vertex=scan.nextInt();
int num_edge=scan.nextInt();
int[] a=new int[num_edge];
int[] b=new int[num_edge];
int[] c=new int[num_edge];
... | Main.java:2: error: class CandidatesOfNoShortestPaths is public, should be declared in a file named CandidatesOfNoShortestPaths.java
public class CandidatesOfNoShortestPaths {
^
Main.java:27: error: bad operand types for binary operator '&&'
if(a[k]=i && b[k]==j){
^
fi... |
s446831875 | p03837 | C++ | #include <bits/stdc++.h>
using namespace std;
// Type alias
using ll=long long;
using ld=double;
using pi=pair<int,int>;
using pll=pair<ll,ll>;
using pld=pair<ld,ld>;
using ti3=tuple<int, int, int>;
using vi=vector<int>;
using vll=vector<ll>;
using vld=vector<ld>;
using vpi=vector<pi>;
using vpll=vector<ll>;
usin... | a.cc: In function 'void solve()':
a.cc:77:13: error: 'dist' was not declared in this scope
77 | rep(i, N) dist[i][i] = 0;
| ^~~~
|
s806700160 | p03837 | C++ | #include<iostream>
using namespace std;
int main(void){
2 const int inf = 100000000;
3
3
4 int n,m;
5 cin >> n >> m;
6
7 int a[1000],b[1000],c[1000],dist[100][100];
8
9 for(int i = 0; i < m; ++i){
10 cin >> a[i] >> b[i] >> c[i];
11 a[i]--,b[i]--;
12 }
13
14 for(int i = 0; i < n; ++i){
15 for(int j = 0; j < n; ++j){
16 ... | a.cc: In function 'int main()':
a.cc:4:2: error: expected ';' before 'const'
4 | 2 const int inf = 100000000;
| ^~~~~~
| ;
a.cc:5:2: error: expected ';' before numeric constant
5 | 3
| ^
| ;
6 | 3
| ~
a.cc:8:2: error: expected ';' before 'cin'
8 | 5 cin >> n >> m;
... |
s667468037 | p03837 | C++ | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define i... | a.cc: In function 'int main()':
a.cc:63:3: error: 'warshall_floyd' was not declared in this scope; did you mean 'warshallfloyd'?
63 | warshall_floyd();
| ^~~~~~~~~~~~~~
| warshallfloyd
|
s277215852 | p03837 | C++ | # include <iostream>
using namespace std;
int main(){
int N, M;
int a, b, c, count;
int d[100][100], dc[100][100];
// load the graph
for(int m = 0; m < M; m++) {
cin >> a >> b >> c;
d[a][b] = c;
d[b][a] = c;
}
dc = d;
for(int k = 0; k < N; k++) {
for(int i = 0; i < N; i++) {
... | a.cc: In function 'int main()':
a.cc:18:6: error: invalid array assignment
18 | dc = d;
| ~~~^~~
|
s826627014 | p03837 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
#include<map>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define sc(x) scanf("%d",&x);
static const int MAX = 100;
static const int IN... | a.cc: In function 'int check()':
a.cc:28:10: error: declaration does not declare anything [-fpermissive]
28 | bool short;
| ^~~~~
a.cc:30:15: error: expected unqualified-id before '=' token
30 | short = true;
| ^
a.cc:32:18: error: expected primary-expression before ... |
s756615716 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq... | a.cc: In function 'int main()':
a.cc:27:33: error: no matching function for call to 'std::vector<std::vector<bool> >::vector(long long int&, std::vector<long long int>)'
27 | vector<vector<bool>> F(N,vi(N));
| ^
In file included from /usr/include/c++/14/vector:66,
... |
s660459644 | p03837 | Java | import java.*;
public class Main {
public static final int inf = 1000000000;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), m = sc.nextInt();
int[][] in = new int[m][3];//from to cost
int[][] sp = new int[n][n];
int ans_ = 0;
for (int i = 0; i < n; i... | Main.java:1: error: package java does not exist
import java.*;
^
Main.java:120: error: cannot find symbol
ArrayList<Edge> edges;
^
symbol: class ArrayList
location: class Dijkstra.Node
Main.java:145: error: cannot find symbol
private ArrayList<Integer> pair;
^
symbol: class ArrayList
loc... |
s224710109 | p03837 | C++ | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
const int INF = 1<<29;
const int MAX_V = 110;
const int MAX_E = 1100;
int N, M;
int a[MAX_E], b[MAX_E], c[MAX_E]; //各辺
int dist[MAX_V][MAX_V] //Warshall-Floyd用
int main(){
cin >> N >> M;
//Warshall-Floydでよくやる初期化
for (int i = 0... | a.cc:16:1: error: expected initializer before 'int'
16 | int main(){
| ^~~
|
s638882599 | p03837 | C++ | #include <bits/stdc++.h>
//#include <mylib.h>
using namespace std;
//cin.sync_with_stdio(false);
#define FOR(i,a,b) for(ll i = (a); i < (b); ++i)
#define FOR_EQ(i,a,b) for(ll i = (a); i <= (b); ++i)
#define FOR_RE(i,a,b) for(ll i = (a); i >= (b); --i) // 終端を0じゃなくて、1まですることによってn回。感覚的に1以上にしておいた。
#define rep(i,n) FOR(i,... | a.cc: In function 'void dijkstra()':
a.cc:127:24: error: reference to 'map' is ambiguous
127 | minv = map[u][v];
| ^~~
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc... |
s131434479 | p03837 | C | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef pair<int, pair<int, int>> PP;
int main() {
int n, m;
cin >> n >> m;
vector<vector<PP>> r(n, vector<PP>());
vector<vector<int>> l(n, vector<int>(n, INT_MAX));
vector<int> u(m);
for(int i = 0; i < m; i++) {
int a, b, c;
c... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s249578862 | p03837 | Java | import java.util.*;
import java.io.*;
//別解:最短経路か判定する部分
//エッジがいずれかの頂点間の最短経路であるかいなかの調べ方を
//各エッジについて、全ての出発点と全ての到着点を調べ、その最短経路に使われるか調べる方法
class Edge{
int from, to, cost;
public Edge(int from, int to, int cost) {
super();
this.from = from;
this.to = to;
this.cost = cost;
}
}
public class Main {
static int m... | Main.java:122: error: reached end of file while parsing
}
^
1 error
|
s159922704 | p03837 | C++ | /*やったぜ。 投稿者:変態糞土方 (8月16日(水)07時14分22秒)
昨日の8月15日にいつもの浮浪者のおっさん(60歳)と先日メールくれた汚れ好きの土方のにいちゃん
(45歳)とわし(53歳)の3人で県北にある川の土手の下で盛りあったぜ。
今日は明日が休みなんでコンビニで酒とつまみを買ってから滅多に人が来ない所なんで、
そこでしこたま酒を飲んでからやりはじめたんや。
3人でちんぽ舐めあいながら地下足袋だけになり持って来たいちぢく浣腸を3本ずつ入れあった。
しばらくしたら、けつの穴がひくひくして来るし、糞が出口を求めて腹の中でぐるぐるしている。
浮浪者のおっさんにけつの穴をなめさせながら、兄ちゃんのけつの穴を舐め... | a.cc: In function 'int main()':
a.cc:142:32: error: use of deleted function 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::pair<int, int>; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
142 |... |
s463892775 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
void dij(int V, int E, vector<vector<int> >a, int src, vector<bool> &c)
{
int dist[V] = {INT_MAX};
dist[src] = 0;
for (int i = 1; i <= V - 1; i++)
{
for (int j = 0; j < E; j++)
{
int u = a[j][0];
int v = a[j][1];
... | a.cc: In function 'int main()':
a.cc:35:9: error: 'bellman' was not declared in this scope
35 | bellman(n, m, a, 0, c);
| ^~~~~~~
|
s124938191 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
void dij(int V, int E, vector<vector<int> >a, int src, vector<bool> &c)
{
int dist[V] = {INT_MAX};
dist[src] = 0;
for (int i = 1; i <= V - 1; i++)
{
for (int j = 0; j < E; j++)
{
int u = a[j][0];
int v = a[j][1];
... | a.cc: In function 'int main()':
a.cc:35:26: error: 'vis' was not declared in this scope
35 | bellman(n, m, a, vis, 0, c);
| ^~~
a.cc:35:9: error: 'bellman' was not declared in this scope
35 | bellman(n, m, a, vis, 0, c);
| ^~~~~~~
|
s540721902 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
void dij(int V, int E, vector<vector<int> >a, int src, vector<bool> &c)
{
int dist[V] = INT_MAX;
dist[src] = 0;
for (int i = 1; i <= V - 1; i++)
{
for (int j = 0; j < E; j++)
{
int u = a[j][0];
int v = a[j][1];
... | a.cc: In function 'void dij(int, int, std::vector<std::vector<int> >, int, std::vector<bool>&)':
a.cc:6:23: error: array must be initialized with a brace-enclosed initializer
6 | int dist[V] = INT_MAX;
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:35:26: error: 'vis' was not dec... |
s475956343 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
void dij(int V, int E, vector<vector<int> >a, int src, vector<bool> &c)
{
int dist[V] = INT_MAX;
dist[src] = 0;
for (int i = 1; i <= V - 1; i++)
{
for (int j = 0; j < E; j++)
{
int u = a[j][0];
int v = a[j][1];
... | a.cc: In function 'void dij(int, int, std::vector<std::vector<int> >, int, std::vector<bool>&)':
a.cc:6:23: error: array must be initialized with a brace-enclosed initializer
6 | int dist[V] = INT_MAX;
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:28:16: error: 'vetcor' was not ... |
s861927422 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
void dij(int V, int E, vector<vector<int> >a, int src, vector<bool> &c)
{
int dist[V] = INT_MAX;
dist[src] = 0;
for (int i = 1; i <= V - 1; i++)
{
for (int j = 0; j < E; j++)
{
int u = a[j][0];
int v = a[j][1];
... | a.cc: In function 'void dij(int, int, std::vector<std::vector<int> >, int, std::vector<bool>&)':
a.cc:6:23: error: array must be initialized with a brace-enclosed initializer
6 | int dist[V] = INT_MAX;
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:28:16: error: 'vetor' was not d... |
s030424691 | p03837 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define REP(i, j, n) for (int i = j; i < (n); ++i)
#define SORT(a) sort(a.begin(), a.end())
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
int n, m;
cin >> n >> m;
int a[1000], b[1000], c[1000], dist... | a.cc:11:1: error: 'cin' does not name a type
11 | cin >> n >> m;
| ^~~
a.cc:13:1: error: expected unqualified-id before 'for'
13 | for (int i = 0; i < m; ++i)
| ^~~
a.cc:13:17: error: 'i' does not name a type; did you mean 'vi'?
13 | for (int i = 0; i < m; ++i)
| ^
| ... |
s469331010 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define rrep(i,a,b) for(ll i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#define MAX_V 104
int d[MAX_V][MAX_V]; //d[u][v]は辺e=(u,v)のコスト(存在しない場合はINF,d[i]... | a.cc: In function 'void print_path(int, int)':
a.cc:38:10: error: 'cur' was not declared in this scope
38 | path[cur][nex[cur][goal]] = 1;
| ^~~
|
s060040617 | p03837 | C++ | int main(void){
2 const int inf = 100000000;
3
3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
int n,m; cin>>n>>m;
int a[1000],b[1000],c[1000],dist[100][100];
for(inti=0;i< cin >> a[i] >> a[i]--,b[i]--;
}
for(inti=0;i< for(int j = 0;
m; ++i){... | a.cc: In function 'int main()':
a.cc:2:2: error: expected ';' before 'const'
2 | 2 const int inf = 100000000;
| ^~~~~~
| ;
a.cc:3:3: error: expected ';' before numeric constant
3 | 3
| ^
| ;
4 | 3 4 5 6 7 8 9
| ~
a.cc:6:10: error: 'cin' was not declared in this scope
... |
s148317178 | p03837 | C++ | #include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n,m,a[1000],b[1000],c[1000],dist[100][100],ans =0;
cin >> n>> m;
for(int i=0;i<m;i++){
cin >> a[i] >> b[i] >> c[i];
a[i]--,b[i]--;
}
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
... | a.cc: In function 'int main()':
a.cc:42:9: error: 'd' was not declared in this scope
42 | d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
| ^
|
s618204003 | p03837 | C++ | #include <iostream>
using namespace std ;
int a[40], b[40], c[40];
int n, ma, mb;
int main(void){
cin>>n;
cin>>ma;
cin>>mb;
for(int i=0;i<n;i++){
cin>>a[i];
cin>>b[i];
cin>>c[i];
}
int ans=search(0, 0, 0, 0);
if(ans==10000) ans=-1;
cout<<ans;
}
int search(int ... | a.cc: In function 'int main()':
a.cc:17:19: error: no matching function for call to 'search(int, int, int, int)'
17 | int ans=search(0, 0, 0, 0);
| ~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s791304517 | p03837 | C++ | #include <cstdio>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
const int INF=1<<29;
int main(){
int n,m,a[100],b[100],c[100];
scanf("%d%d",&n,&m);
rep(i,m) scanf("%d%d%d",&a[i],&b[i],&c[i]), a[i]--, b[i]--;
int d[100][100];
rep(u,n) rep(v,n) d[u][v]=d[v][u]=(u==v?0:INF);
rep(i,m) d[a[i]][b[i]... | a.cc: In function 'int main()':
a.cc:18:44: error: 'min' was not declared in this scope; did you mean 'main'?
18 | rep(k,n) rep(i,n) rep(j,n) d[i][j]=min(d[i][j],d[i][k]+d[k][j]);
| ^~~
| main
|
s852126428 | p03837 | C++ | #![allow(unused_imports)]
#![allow(non_snake_case)]
#![allow(unused_mut)]
#![allow(dead_code)]
#![allow(unused_variables)]
use std::collections::HashSet;
use std::collections::HashMap;
use std::collections::BTreeSet;
use std::collections::VecDeque;
use std::cmp::{max, min};
use std::mem::swap;
use std::io::prelude::*;... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #![allow(unused_imports)]
| ^
a.cc:2:2: error: invalid preprocessing directive #!
2 | #![allow(non_snake_case)]
| ^
a.cc:3:2: error: invalid preprocessing directive #!
3 | #![allow(unused_mut)]
| ^
a.cc:4:2: error: invalid preproce... |
s879383950 | p03837 | C++ | #![allow(unused_imports)]
#![allow(non_snake_case)]
#![allow(unused_mut)]
#![allow(dead_code)]
#![allow(unused_variables)]
use std::collections::HashSet;
use std::collections::HashMap;
use std::collections::BTreeSet;
use std::collections::VecDeque;
use std::cmp::{max, min};
use std::mem::swap;
use std::io::prelude::*;... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #![allow(unused_imports)]
| ^
a.cc:2:2: error: invalid preprocessing directive #!
2 | #![allow(non_snake_case)]
| ^
a.cc:3:2: error: invalid preprocessing directive #!
3 | #![allow(unused_mut)]
| ^
a.cc:4:2: error: invalid preproce... |
s137313956 | p03837 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
long long c=a%i_7;
if(c>=0)return c;
return c+i_7;
}
using namespace st... | a.cc: In function 'int main()':
a.cc:93:49: error: no matching function for call to 'std::vector<int>::vector(int&, std::vector<int>)'
93 | vector<int> dist(n, vector<int>(n, 10'000'000));
| ^
In file included from /usr/include/c++/14/vector:66,
... |
s396275323 | p03837 | C++ | from collections import defaultdict
from heapq import heappop, heappush
class Graph(object):
"""
隣接リストによる有向グラフ
"""
def __init__(self):
self.graph = defaultdict(list)
def __len__(self):
return len(self.graph)
def add_edge(self, src, dst, weight=1):
self.graph[src].appen... | a.cc:4:7: warning: missing terminating " character
4 | """
| ^
a.cc:4:7: error: missing terminating " character
a.cc:6:7: warning: missing terminating " character
6 | """
| ^
a.cc:6:7: error: missing terminating " character
a.cc:22:7: warning: missing terminating " character
2... |
s643360078 | p03837 | C++ | #include <bits/stdc++.h>
#define l_ength size
const int inf = 1000000;
using ll = long long;
using namespace std;
struct edge{
int from;
int to;
int cost;
};
int main(){
int n, m; cin >> n >> m;
int dist[n][n];
vector<edge> graph;
for( int i = 0; i < n; ++i ){
for( int j = 0; j < n; ++j ){
dist[i][j] = ( ... | a.cc: In function 'int main()':
a.cc:19:55: error: 'INF' was not declared in this scope
19 | dist[i][j] = ( i == j ) ? 0 : INF;
| ^~~
a.cc:44:35: error: 'd' was not declared in this scope
44 | for( auto e : graph ) if( d[e... |
s898488250 | p03837 | C++ | #include <bits/stdc++.h>
#define l_ength size
using ll = long long;
const int inf = 1000000;
const int mod = 1000000007;
using namespace std;
struct edge{
int from;
int to;
int cost;
};
int main(){
int n, m; cin >> n >> m;
int dist[n][n];
vector<edge> graph;
for( int i = 0; i < n; ++i ){
for( int j = 0; j < ... | a.cc: In function 'int main()':
a.cc:20:55: error: 'infll' was not declared in this scope; did you mean 'inf'?
20 | dist[i][j] = ( i == j ) ? 0 : infll;
| ^~~~~
| inf
|
s741124287 | p03837 | C++ | #include <bits/stdc++.h>
#define l_ength size
using ll = long long;
using namespace std;
const int inf = 1000000;
struct edge{
int from;
int to;
int cost;
};
int main(){
int n, m; cin >> n >> m;
int dist[n][n];
vector<edge> graph;
for( int i = 0; i < n; ++i ){
for( int j = 0; j < n; ++j ){
dist[i][j] = IN... | a.cc: In function 'int main()':
a.cc:19:38: error: 'INF' was not declared in this scope
19 | dist[i][j] = INF;
| ^~~
|
s644232022 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
const int INF = pow(10, 7);
int main(){
int n, m;cin>>n>>m;
vector<vector<int>> dis(n, vector<int>(n, INF));
vector<pair<P, int>> edge(m);
for(int i=0;i<m;i++){
int a, b, c;cin>>a>>b>>c;a--;b--;
dis[a][b]=di... | a.cc: In function 'int main()':
a.cc:16:15: error: 'i' was not declared in this scope
16 | for(int k=0;i<n;k++){
| ^
a.cc:17:21: error: 'j' was not declared in this scope
17 | for(int i=0;j<n;i++){
| ^
|
s115989956 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
int inf = 10000001;
int main(){
int n, m;cin >> n >> m;
vector<int> a(m);
vector<int> b(m);
vector<int> c(m);
vector<vector<int> > dp(n+1, vector<int>(n+1));
for(int i = 0; i<m;i++){
cin >> a[i] >> b[i] >> c[i];
a[i]--;b[i]--
}
... | a.cc: In function 'int main()':
a.cc:14:22: error: expected ';' before '}' token
14 | a[i]--;b[i]--
| ^
| ;
15 | }
| ~
|
s161089653 | p03837 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
template<class T> inline bool chmin(T &a, T b){ if(a > b) { a = b; return true;} return false;}
bool used[100][100];
// O(V^3)
void warshall_floyd(int n, vector<vector<int> > &g) {
for(int k = 0; k < n; ++k)
... | a.cc: In function 'int main()':
a.cc:27:5: error: 'll' was not declared in this scope
27 | ll n,m; cin >> n >> m;
| ^~
a.cc:27:20: error: 'n' was not declared in this scope
27 | ll n,m; cin >> n >> m;
| ^
a.cc:27:25: error: 'm' was not declared in this scope; did you mea... |
s822172549 | p03837 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
void warshall_floyd(int n, vector<vector<int> > &g) {
for(int k = 0; k < n; ++k)
for(int i = 0; i < n; ++i)
for(int j = 0; j < n; ++j) g[i][j] = min(g[i][j], g[i][k] + g[k][j]);
}
int main() {
ci... | a.cc: In function 'int main()':
a.cc:15:5: error: 'll' was not declared in this scope
15 | ll n,m; cin >> n >> m;
| ^~
a.cc:15:20: error: 'n' was not declared in this scope
15 | ll n,m; cin >> n >> m;
| ^
a.cc:15:25: error: 'm' was not declared in this scope; did you mea... |
s023691051 | p03837 | C++ | #include"bits/stdc++.h"
#define int long long
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(a);i<(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define itr(i,x) for(auto i=(x).begin();i!=(x).end();++i)
#define All(x) (x).begin(),(x).en... | a.cc: In function 'int main()':
a.cc:72:23: error: 'n' was not declared in this scope
72 | rep(j,n) if(dist[j][a[i]]+c[i]==dist[j][b[i]]) shortest=true;
| ^
a.cc:5:38: note: in definition of macro 'repi'
5 | #define repi(i,a,b) for(int i=(a);i<(b);++i)
| ... |
s527750949 | p03837 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef... | a.cc: In function 'int main()':
a.cc:75:5: error: 'flag' was not declared in this scope
75 | flag[V][V];
| ^~~~
|
s143630482 | p03837 | C++ | #include "bits/stdc++.h"
using namespace std;
#define rep(i,a,n) for(int i=a;i<n;i++)
#define ALL(s) s.begin(),s.end()
const int M=100010;
int INF=1000000007;
using ll=long long;
int main(){
int n,m;
int a[110],b[110],c[110];
cin>>n>>m;
int dis[110][110]={};
//ワーシャルフロイド法;
rep(i,0,n){
rep(j,0,n){
if(i!=j)d... | a.cc: In function 'int main()':
a.cc:26:17: error: 'dist' was not declared in this scope; did you mean 'dis'?
26 | dist[b[i]][a[i]]=min(dis[b[i]][a[i]],c[i]);
| ^~~~
| dis
|
s315088733 | p03837 | C++ | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> path(110,vector<int>(110,-1));
int shorter(int s,int e){
if(path[s][e] == -1) return 0;
int MIN = path[s][e];
for(int i = 0;i < 110;i++){
if(path[s][i]==-1)break;
else{
MIN = min(MIN,shorter(i,e));
}
}
if(MIN < path[s][e])retu... | a.cc: In function 'int main()':
a.cc:30:26: error: expected ';' before ')' token
30 | for(int j = 1 < i;j++){
| ^
| ;
a.cc: In function 'int shorter(int, int)':
a.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
15 | }
... |
s140687997 | p03837 | C++ | #include <stdio.h>
using namespace std;
int main(void)
{
const int inf = 100000000;
int n, m;
cin >> n >> m;
int a[1000], b[1000], c[1000], dist[100][100];
for (int i = 0; i < m; ++i)
{
cin >> a[i] >> b[i] >> c[i];
a[i]--, b[i]--;
}
for (int i = 0; i < n; ++i)
{
... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
8 | cin >> n >> m;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <stdio.h>
+++ |+#include <iostream>
2 | using nam... |
s563801670 | p03837 | C++ | int main(void)
{
const int inf = 100000000;
int n, m;
cin >> n >> m;
int a[1000], b[1000], c[1000], dist[100][100];
for (int i = 0; i < m; ++i)
{
cin >> a[i] >> b[i] >> c[i];
a[i]--, b[i]--;
}
for (int i = 0; i < n; ++i)
{
for (int j = 0; j < n; ++j)
... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin >> n >> m;
| ^~~
a.cc:33:28: error: 'min' was not declared in this scope; did you mean 'main'?
33 | dist[a[i]][b[i]] = min(dist[a[i]][b[i]], c[i]);
| ^~~
| ... |
s326469756 | p03837 | C++ | #include <iostream>
#include <vector>
#include <queue>
#define forn(i, n) for (int i = 0; i < (int)n; ++i)
#define for1(i, n) for (int i = 1; i <= (int)n; ++i)
#define fore(i, l, r) for (int i = (int)(l); i <= (int)(r); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define pb push_back
#define fi fir... | a.cc: In function 'int main()':
a.cc:37:5: error: 'memset' was not declared in this scope
37 | memset(d, INF, sizeof(d[0][0]) * 100 * 100);
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++ |+#inclu... |
s958644848 | p03837 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <vector>
#include <iomanip>
#define ALL(x) (x).begin(), (x).end()
#define dll(x) scanf("%I64d",&x)
#define xll(x) printf("%I64d\n",x)
#define sz(a) int(... | a.cc: In function 'int main()':
a.cc:64:17: error: 'dist' was not declared in this scope
64 | dist[a[i]][b[i]]=min(dist[a[i]][b[i]],c[i]);
| ^~~~
|
s198652517 | p03837 | C++ | #include<bits/stdc++.h>
#define x first
#define y second
#define ll long long
#define pii pair<int, int>
#define maxn 1005
#define INF 0x7FFFFFFF
#define dbg(n) cout << n << endl
#define mod 1000000007
using namespace std;
inline void read(int &x){
int f = 1; x = 0; char s = getchar();
while(s > '9' || s < '0'){
... | a.cc: In function 'int main()':
a.cc:39:30: error: invalid types 'int[int]' for array subscript
39 | G1[i][j] = INF;
| ^
a.cc:42:22: error: invalid types 'int[int]' for array subscript
42 | G1[f][t] = c;
| ^
a.cc... |
s178466727 | p03837 | C++ | #include<bits/stdc++.h>
#define x first
#define y second
#define ll long long
#define pii pair<int, int>
#define maxn 1005
#define INF 0x7FFFFFFF
#define dbg(n) cout << n << endl
#define mod 1000000007
using namespace std;
inline void read(int &x){
int f = 1; x = 0; char s = getchar();
while(s > '9' || s < '0'){
... | a.cc: In function 'int main()':
a.cc:39:29: error: invalid types 'int[int]' for array subscript
39 | G[i][j] = INF;
| ^
a.cc:42:21: error: invalid types 'int[int]' for array subscript
42 | G[f][t] = c;
| ^
a.cc:43:... |
s030298756 | p03837 | C++ | #include "bits/stdc++.h"
using namespace std;
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define REP(i,n) for(int i=0;i<(n);i++)
int d[100][100];
int main(){
int n,m;
int a[1000],b[1000],c[1000];
cin>>n>>m;
REP(i,n)REP(j,n)d[i][j]=1e9;
REP(i,n)d[i][j]=0;
REP(... | a.cc: In function 'int main()':
a.cc:13:18: error: 'j' was not declared in this scope
13 | REP(i,n)d[i][j]=0;
| ^
a.cc:16:22: error: expected ';' before ':' token
16 | a[i]--;b[i]--:
| ^
| ;
|
s650568317 | p03837 | C++ | #include <iostream>
#include <vector>
#include <utility>
using namespace std;
int d[110][110] = {};
int n, m, inf = 1e9 + 7, a[1010], b[1010], c[1010], ans;
bool used[1010];
void warshall_floyd(int n)
{
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
for (int k = 0; k <... | a.cc: In function 'int main()':
a.cc:36:25: error: expected primary-expression before '%' token
36 | scanf("%d%d%d", % a[i], &b[i], &c[i]);
| ^
|
s841373734 | p03837 | C++ | #include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<ctime>
#include<cstdio>
#include<string>
//#include<string>
//#include<sstream>
using namespace std;
const int MAX_V=10000+5;
const int INF=1<<30;
int pre[MAX_V];
int cost[MAX_V][MAX_V];//cost[u][v]表示边e=(u,v)的权值(不存在这条边时... | a.cc:49:1: error: 'vector' does not name a type
49 | vector<int> get_path(int t)
| ^~~~~~
a.cc: In function 'int main()':
a.cc:80:13: error: 'vector' was not declared in this scope
80 | vector<int>v=get_path(j);
| ^~~~~~
a.cc:8:1: note: 'std::vector' is defined in header '<vect... |
s988021742 | p03837 | C | //答え見たよ!!!
#include<stdio.h>
#define INFINITY 9999999
struct Neighborhood{
int dist;//結ばれた2つのノードの距離
int no;//辺の番号
};
int main(){
int i, j;
//入力
int N, M;
scanf("%d %d", &N, &M);
int a[M+1], b[M+1], c[M+1];//a[0], b[0], c[0]は使わない
for(i=1; i<=M; i++)
scanf("%d %d %d", &a[i], &b[i], &c[i]);
//入力ここま... | main.c: In function 'main':
main.c:59:12: error: used struct type value where scalar is required
59 | if(nbh[t][i] && !fix[i]){
| ^~~
main.c:60:35: error: invalid operands to binary + (have 'int' and 'struct Neighborhood')
60 | dist[s][i] = dist[s][t] + nbh[t][i];
| ... |
s512717839 | p03837 | C | //答え見たよ!!!
#include<stdio.h>
#define INFINITY 9999999
struct Neighborhood{
int dist;//結ばれた2つのノードの距離
int no;//辺の番号
};
int main(){
int i, j;
//入力
int N, M;
scanf("%d %d", &N, &M);
int a[M+1], b[M+1], c[M+1];//a[0], b[0], c[0]は使わない
for(i=1; i<=M; i++)
scanf("%d %d %d", &a[i], &b[i], &c[i]);
//入力ここま... | main.c: In function 'main':
main.c:31:3: error: unknown type name 'Neighborhood'; use 'struct' keyword to refer to the type
31 | Neighborhood nbh[N+1][N+1];
| ^~~~~~~~~~~~
| struct
main.c:34:20: error: request for member 'dist' in something not a structure or union
34 | nbh[a[i]][b[i]].dist... |
s943058276 | p03837 | C | //答え見たよ!!!
#include<stdio.h>
#define INFINITY 9999999
struct Neighborhood{
int dist;//結ばれた2つのノードの距離
int no;//辺の番号
}
int main(){
int i, j;
//入力
int N, M;
scanf("%d %d", &N, &M);
int a[M+1], b[M+1], c[M+1];//a[0], b[0], c[0]は使わない
for(i=1; i<=M; i++)
scanf("%d %d %d", &a[i], &b[i], &c[i]);
//入力ここまで... | main.c:10:1: error: expected ';', identifier or '(' before 'int'
10 | int main(){
| ^~~
main.c: In function 'main':
main.c:31:3: error: unknown type name 'Neighborhood'; use 'struct' keyword to refer to the type
31 | Neighborhood nbh[N+1][N+1];
| ^~~~~~~~~~~~
| struct
main.c:34:20: error:... |
s815914310 | p03837 | C | //答え見たよ!!!
#include<stdio.h>
#define INFINITY 9999999
int main(){
int i, j;
//入力
int N, M;
scanf("%d %d", &N, &M);
int a[M+1], b[M+1], c[M+1];//a[0], b[0], c[0]は使わない
for(i=1; i<=M; i++)
scanf("%d %d %d", &a[i], &b[i], &c[i]);
//入力ここまで
int ans = M;//最短経路に含まれない辺の本数
int dist[N+1][N+1];//最短距離
int n... | main.c: In function 'main':
main.c:41:9: error: expected declaration or statement at end of input
41 | dist[s][i] = dist[s][t] + nbh[t][i];
| ^~~~
main.c:41:9: error: expected declaration or statement at end of input
main.c:41:9: error: expected declaration or statement at end of input
|
s664369838 | p03837 | C++ | //Warshall-Floyd
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(void){
int N, M;
cin >> N >> M;
vector<int> a(M), b(M);
vector<long long> c(M);
vector<vector<long long>> d(N, vector<long long>(N, LLONG_MAX / 2));
vector<vector<vector<int>>> p(N, vector<v... | a.cc: In function 'int main()':
a.cc:14:57: error: 'LLONG_MAX' was not declared in this scope
14 | vector<vector<long long>> d(N, vector<long long>(N, LLONG_MAX / 2));
| ^~~~~~~~~
a.cc:6:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is p... |
s444625035 | p03837 | C++ | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9+7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define FOREACH(x,a) for(auto& (x) : (a) )
ty... | a.cc: In function 'int main(int, const char**)':
a.cc:36:12: error: no matching function for call to 'DP::DP(int&)'
36 | DP dp(n);
| ^
a.cc:13:16: note: candidate: 'DP::DP()'
13 | typedef struct DP {
| ^~
a.cc:13:16: note: candidate expects 0 arguments, 1 provided
a.cc:... |
s790957233 | p03837 | C++ | #include <iostream>
#include <limits>
#include <map>
#include <vector>
using namespace std;
template <typename N = std::size_t, typename E = std::size_t>
class DenseGraph {
public:
using NodeType = N;
using EdgeType = E;
using NeighborListType = std::vector<std::size_t>;
DenseGraph(const std::size_t ... | a.cc: In member function 'void DenseGraph<N, E>::disconnect(std::size_t, std::size_t)':
a.cc:44:39: error: no matching function for call to 'std::vector<long unsigned int>::erase(const std::size_t&)'
44 | neighbor_list_[from].erase(to);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included ... |
s258611047 | p03837 | C++ | #include <stdio.h>
#include <algorithm>
#include <
int main()
{
int n, m, distance[100][100]{}, edge[100][100]{};
std::fill(distance[0], distance[0] + 10000, 1000000000);
scanf("%d%d", &n, &m);
for (int i = 0; i < m; i++)
{
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
a--; b--;
distance[a][b] = distance[b][a... | a.cc:3:11: error: missing terminating > character
3 | #include <
| ^
a.cc:3:10: error: empty filename in #include
3 | #include <
| ^
|
s100484632 | p03837 | C++ | x | a.cc:1:1: error: 'x' does not name a type
1 | x
| ^
|
s930632107 | p03837 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;cin>>n>>m;
int d[n+1][n+1];
for(int i=0;i<=n;i++)for(int j=0;j<=n;j++)d[i][j]=-1;
int s[n+1][n+1];
int a[m],b[m],c[m];
for(int i=0;i<m;i++){
cin>>a[i]>>b[i]>>c[i];
d[a[i]][b[i]]=c[i];
d[b[i]][a[i]]=c[i];
}
for(int i=1;i<=n;i++)... | a.cc: In function 'int main()':
a.cc:43:4: error: expected '}' at end of input
43 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s700880639 | p03837 | C++ | #include<iostream>
#include<algorithm>
#include<math.h>
#include<queue>
#include<string>
#include<vector>
#include<tuple>
#include<stack>
#include<iomanip>
#include<map>
using namespace std;
//def lib
#define rep(i,n) for(int i=0;i<((int)n);i++)
#define drep(i,n) for(int i=((int)n)-1;i>-1;i--)
#define Rep(i,n0,n) for(i... | a.cc: In function 'int main()':
a.cc:45:5: error: 'inti' was not declared in this scope; did you mean 'int'?
45 | for(inti=0;i< cin >> a[i] >> a[i]--,b[i]--;
| ^~~~
| int
a.cc:45:12: error: 'i' was not declared in this scope
45 | for(inti=0;i< cin >> a[i] >> a[i]--,b[i]--;
| ^... |
s186723251 | p03837 | C++ | #include <functional>
#include <climits>
#include <iostream>
#include <unordered_set>
#include <vector>
class warshall_floyd
{
private:
int node_num;
bool is_negative_graph;
std::vector<std::vector<long long>> cost_matrix;//隣接行列を構築
std::vector<std::vector<int>> pred;//経路(遷移元)を保持
public:
warshall_floyd(const i... | a.cc: In member function 'std::vector<int> warshall_floyd::get_min_path(int, int) const':
a.cc:111:14: error: 'reverse' is not a member of 'std'
111 | std::reverse(vec.begin(), vec.end());
| ^~~~~~~
|
s623298921 | p03837 | C++ | #include <functional>
#include <climits>
#include <iostream>
#include <unordered_set>
class warshall_floyd
{
private:
int node_num;
bool is_negative_graph;
std::vector<std::vector<long long>> cost_matrix;//隣接行列を構築
std::vector<std::vector<int>> pred;//経路(遷移元)を保持
public:
warshall_floyd(const int node_num, const ... | a.cc: In member function 'std::vector<int> warshall_floyd::get_min_path(int, int) const':
a.cc:109:14: error: 'reverse' is not a member of 'std'
109 | std::reverse(vec.begin(), vec.end());
| ^~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.