submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s289272593 | p03722 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
#define N 11000
#define INF 111111111111111111ll
typedef long long ll;
ll n, m;
ll d[N], u[N], v[N];
bool inf(){
for (int i = 1; i <= n; ++i) d[i] = INF;
d[n] = 0;
for (int k = 0; k < n; ++k) {
for (int i = 0; i < ... | a.cc: In function 'bool inf()':
a.cc:21:31: error: 'w' was not declared in this scope
21 | if (d[y] > d[x] + w[i]) {
| ^
a.cc: In function 'int main()':
a.cc:34:50: error: 'w' was not declared in this scope
34 | scanf("%lld%lld%lld", &u[i], &v[i], &w[i])... |
s170609867 | p03722 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
#define N 11000
#define INF 111111111111111111ll
typedef long long ll;
ll n, m;
ll d[N], u[N], v[N];
bool inf(){
for (int i = 1; i <= n; ++i) d[i] = INF;
d[1] = 0;
for (int k = 0; k < n; ++k) {
for (int i = 0; i < ... | a.cc: In function 'bool inf()':
a.cc:21:31: error: 'w' was not declared in this scope
21 | if (d[y] > d[x] + w[i]) {
| ^
a.cc: In function 'int main()':
a.cc:34:50: error: 'w' was not declared in this scope
34 | scanf("%lld%lld%lld", &u[i], &v[i], &w[i])... |
s720535760 | p03722 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
#define N 11000
#define INF 111111111111111111ll
typedef long long ll;
int n, m;
ll d[N], u[N], v[N];
bool inf(){
for (int i = 1; i <= n; ++i) d[i] = INF;
d[1] = 0;
for (int k = 0; k < n; ++k) {
for (int i = 0; i <... | a.cc: In function 'bool inf()':
a.cc:21:31: error: 'w' was not declared in this scope
21 | if (d[y] > d[x] + w[i]) {
| ^
a.cc: In function 'int main()':
a.cc:34:50: error: 'w' was not declared in this scope
34 | scanf("%lld%lld%lld", &u[i], &v[i], &w[i])... |
s413295001 | p03722 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
#define N 11000
#define INF 111111111111111111ll
typedef long long ll;
int n, m;
ll d[N], u[N], v[N];
bool inf(){
for (int i = 1; i <= n; ++i) d[i] = INF;
d[1] = 0;
for (int k = 0; k < n; ++k) {
for (int i = 0; i <... | a.cc: In function 'bool inf()':
a.cc:21:32: error: 'w' was not declared in this scope
21 | if (d[y] >= d[x] + w[i]) {
| ^
a.cc: In function 'int main()':
a.cc:34:50: error: 'w' was not declared in this scope
34 | scanf("%lld%lld%lld", &u[i], &v[i], &w[i... |
s101444100 | p03722 | C++ | #include <iostream>
#define INF 10000000000000
using namespace std;
struct edge
{
int from;
int to;
long long int cost;
};
edge es[2005];
long long int d[1005];
int V, E;
bool negative[1005];
void shortest_path(int s)
{
for (int i = 0; i <= V; i++)
d[i] = INF;
d[s] = 0;
for (int j = 0; j <= V; j++)
{
bo... | a.cc: In function 'bool find_negative_loop()':
a.cc:44:9: error: 'memset' was not declared in this scope
44 | memset(negative, false, 1005);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
... |
s797797911 | p03722 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
usi... | a.cc: In function 'int main()':
a.cc:103:2: error: expected '}' at end of input
103 | }
| ^
a.cc:65:12: note: to match this '{'
65 | int main() {
| ^
|
s512741592 | p03722 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <unordered_map>
#define BIG 998244353
using namespace std;
typedef struct Node{
vector<long> weight;
vector<int> connected;
} node;
long maxscore = LONG_MIN;
void search(const vector<node>& graph,unordered_map<i... | a.cc:17:17: error: 'LONG_MIN' was not declared in this scope
17 | long maxscore = LONG_MIN;
| ^~~~~~~~
a.cc:7:1: note: 'LONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
6 | #include <unordered_map>
+++ |+#include <climits>
7 |
a.cc: ... |
s248914974 | p03722 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Objects;
import java.util.StringTokenizer;
public class Main
... | Main.java:12: error: '{' expected
public class Main
^
Main.java:13: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:166: error: class, interface, enum, or re... |
s935602029 | p03722 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Objects;
import java.util.StringTokenizer;
public class D61 {
... | Main.java:12: error: class D61 is public, should be declared in a file named D61.java
public class D61 {
^
1 error
|
s802011317 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort(... | a.cc: In function 'int main()':
a.cc:56:9: error: 'cost' was not declared in this scope; did you mean 'cosl'?
56 | cost = vector<int>(m);
| ^~~~
| cosl
|
s690271594 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort(... | a.cc: In function 'int main()':
a.cc:56:9: error: 'cost' was not declared in this scope; did you mean 'cosl'?
56 | cost = vector<int>(m);
| ^~~~
| cosl
a.cc:61:36: error: expected ';' before '{' token
61 | Edge[x-1].push_back{y-1,-z};
| ... |
s946065351 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort(... | a.cc: In function 'bool bellman_ford(long long int, long long int)':
a.cc:41:42: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} to 'long long int' in initial... |
s178398541 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort(... | a.cc:110:23: error: 'std::vector<std::pair<long long int, long long int> > Edge' redeclared as different kind of entity
110 | vector<pair<int,int>> Edge;
| ^~~~
a.cc:32:35: note: previous declaration 'typedef struct std::pair<long long int, std::pair<long long int, long long int> > Edge'
... |
s654491744 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort(... | a.cc:110:23: error: 'std::vector<std::pair<long long int, long long int> > edge' redeclared as different kind of entity
110 | vector<pair<int,int>> edge;
| ^~~~
a.cc:32:35: note: previous declaration 'typedef struct std::pair<long long int, std::pair<long long int, long long int> > edge'
... |
s242222014 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort(... | a.cc:134:17: error: macro "FOR" requires 3 arguments, but only 2 given
134 | FOR (i,m) {
| ^
a.cc:9:9: note: macro "FOR" defined here
9 | #define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
| ^~~
a.cc:110:23: error: 'std::vector<std::pair<long long int, long long int> > e... |
s377360232 | p03722 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
using namespace std;
typedef long long ll;
const long long INF = 1LL<<50;
const int MOD = 1e9 + 7;
int main()
... | a.cc: In function 'int main()':
a.cc:21:12: error: 'edge' was not declared in this scope
21 | vector<edge> G[n];
| ^~~~
a.cc:21:16: error: template argument 1 is invalid
21 | vector<edge> G[n];
| ^
a.cc:21:16: error: template argument 2 is invalid
|
s738097102 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MM 1000000000
#define MOD MM+7
#define MAX 101000
#define MAP 110
#define initial_value -1
#define Pair pair<int,int>
#define lPair pair<ll,ll>
#define chmax(a,b) (a<b ? a=b:0)
#define chmin(a,b) (a>b ? a=b:0)
#define debug(a) cout << a << endl;... | a.cc: In function 'int main()':
a.cc:57:8: error: 'BellmanFord' was not declared in this scope; did you mean 'bellmanford'?
57 | if(BellmanFord(0)) cout << d[V-1] << endl;
| ^~~~~~~~~~~
| bellmanford
|
s422609493 | p03722 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <queue>
#include <map>
#include <numeric>
#include <unordered_map>
#include <iomanip>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i=int(a);i<int(b)... | a.cc: In function 'int main()':
a.cc:42:22: error: 'LLONG_MIN' was not declared in this scope
42 | vector<ll>dist(n+1,LLONG_MIN);
| ^~~~~~~~~
a.cc:13:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
12 | #include <iomanip>
... |
s461310068 | p03722 | C++ | //#include <bits/stdc++.h>
#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include... | a.cc: In function 'bool bellman_ford(ll)':
a.cc:89:12: error: 'i' was not declared in this scope
89 | if(i == n-1 && e.to == n-1){
| ^
|
s259291692 | p03722 | C++ | /*
オーダー
10**6 余裕を持って間に合う
10**7 おそらく間に合う 余裕を持って間に合う
10**8 非常にシンプルな処理でない限り厳しい おそらく間に合う
10**9 非常にシンプルな処理でない限り厳しい
logn :OK
n :10^7
nlogn :10^6
n**2 :10^4
n**3 :300
2**n :20
n! :10
// 各桁の和を計算する関数
int findSumOfDigits(int n) {
int sum = 0;
while (n > 0) { // n が 0 になるまで
sum += n % 10;
n /= 10;
}
return ... | a.cc: In function 'bool find_negative_loop()':
a.cc:111:11: error: 's' was not declared in this scope; did you mean 'es'?
111 | d[s] = 0; // 始点sから始点sまでの距離
| ^
| es
|
s706741276 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define Inf 1000000000000000000
int main(){
int N,M;
cin>>N>>M;
//距離をInfで初期化
long long dis[N][N];
for(int i=0;i<N;i++){
for(int j=0;j<N;j++){
if(i==j)dis[i][j]=0;
else dis[i][j]=Inf;
}
}
//辺の情報を受け取る(有向辺を想定)
for(int i=0;i<M;i++){
int a,b,d;
cin>>a>... | a.cc: In function 'int main()':
a.cc:31:54: error: no matching function for call to 'min(long int, long long int)'
31 | dis[i][j]=min(Inf,dis[i][k]+dis[k][j]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/inc... |
s577508183 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#if __has_include("print.hpp")
#include "print.hpp"
#endif
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
typedef long long ll;
typedef pair<int, int> p;
vector<ll> x(1010);
void x_init(){
x[0] = 0;
for (int i = 1; i < 1010; i++) {
... | a.cc: In function 'int main()':
a.cc:72:3: error: 'print' was not declared in this scope; did you mean 'rint'?
72 | print(use);
| ^~~~~
| rint
|
s798627230 | p03722 | C++ | #include <iostream>
using namespace std;
struct edge{ int from, to, cost; };
const int MAX_E = 1e3;
const int MAX_V = 1e6;
edge e[MAX_E];
long long d[MAX_V];
int V, E;
int main(){
cin >> V >> E;
for (int i = 0; i < E; ++i){
int a, b, c;
cin >> a >> b >> c;
e[i] = edge{a,b,c};
}
... | a.cc: In function 'int main()':
a.cc:21:41: error: 'LLONG_MIN' was not declared in this scope
21 | for (int i = 1; i <= V; ++i) d[i] = LLONG_MIN;
| ^~~~~~~~~
a.cc:2:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <c... |
s779707319 | p03722 | C++ | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int N, M;
cin >> N >> M;
vector<int> a(M), b(M), c(M);
for (int i = 0; i < M; i++) {
cin >> a[i] >> b[i]>> c[i];
--a[i], --b[i];
}
vector<int> dist(N, -1e18);
dist[0] = 0;
for (int i = ... | a.cc: In function 'int main()':
a.cc:19:32: error: 'inf' was not declared in this scope; did you mean 'ynf'?
19 | if (dist[a[j]] == -inf) continue;
| ^~~
| ynf
|
s445157642 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
typedef long long ll;
#define MAX_V 10000
const ll INF = 1LL << 50;
using namespace std;
struct edge{
ll from,to,cost;
};
edge es[MAX_V];
ll d[MAX_V];
bool neg[MAX_V];
int V,E;
void Bellman_Ford(int s){
for(int i=0;... | a.cc: In function 'int main()':
a.cc:68:3: error: expected ',' or ';' before 'ch'
68 | ch=find_negative_loop();
| ^~
|
s732257009 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
typedef long long ll;
#define MAX_V 10000
const ll INF = 1LL << 50;
using namespace std;
struct edge{
ll from,to,cost;
};
edge es[MAX_V];
ll d[MAX_V];
bool neg[MAX_V];
int V,E;
void Bellman_Ford(int s){
for(int i=0;... | a.cc: In function 'void find_negative_loop()':
a.cc:48:26: error: return-statement with a value, in function returning 'void' [-fpermissive]
48 | if(i==V-1)return true;
| ^~~~
a.cc:53:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
53 | ... |
s267510173 | p03722 | C++ | def bellman_ford(N, M, edge):
d = [10 ** 100] * N
d[0] = 0
infFlag = False
for count in range(N + 1):
for i in range(M):
if d[edge[i][0]] + edge[i][2] < d[edge[i][1]]:
d[edge[i][1]] = d[edge[i][0]] + edge[i][2]
if count == N and edge[i][1] == N - 1:
... | a.cc:22:15: warning: multi-character character constant [-Wmultichar]
22 | print('inf')
| ^~~~~
a.cc:27:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
27 | if __name__ == '__main__':
| ^~~~~~~~~~
a.cc:1:1: error: 'def' does not... |
s839561273 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
struct edge{long to,cost;};
typedef pair<long,long> P;
vector<edge> g[1010];
long d[1010];
bool mugen = false;
long n,m,kekka = -1000000000000000;
int cou[1010];
long inf = 1000000000000000;
void dfs(long s,long p){
//cout << s << " " << p << " " << p-d[s] << endl;
if(... | a.cc: In function 'void dfs(long int, long int)':
a.cc:16:5: error: lvalue required as increment operand
16 | cou++;
| ^~~
a.cc:23:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
23 | if(s == 1 && cou > 1 && p - d[1] > 0){
| ~~~~^~~
|
s515256366 | p03722 | C++ | (eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter OPT
#+swank '(optimize (speed 3) (safety 2))
#-swank '(optimize (speed 3) (safety 0) (debug 0)))
#+swank (progn (ql:quickload '(:cl-debug-print :fiveam))
(shadow :run)
(use-package :fiveam)))
#+swank (cl-s... | a.cc:3:6: error: invalid preprocessing directive #+
3 | #+swank '(optimize (speed 3) (safety 2))
| ^
a.cc:3:13: warning: missing terminating ' character
3 | #+swank '(optimize (speed 3) (safety 2))
| ^
a.cc:4:6: error: invalid preprocessing directive #-
4 | #-swank '... |
s995314900 | p03722 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstring>
using namespace std;
// ascending order
#define vsort(v) sort(v.begin(), v.end())
// descending order
#de... | a.cc: In function 'bool find_negative_loop(int)':
a.cc:66:47: error: lvalue required as left operand of assignment
66 | if(i == V - 1 and e.to = V - 1) return true;
| ~~~~~~~~~~~^~~~~~~~
|
s465392384 | p03722 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstring>
using namespace std;
// ascending order
#define vsort(v) sort(v.begin(), v.end())
// descending order
#de... | a.cc: In function 'bool find_negative_loop(int)':
a.cc:66:47: error: lvalue required as left operand of assignment
66 | if(i == V - 1 and e.to = V - 1) return true;
| ~~~~~~~~~~~^~~~~~~~
|
s200728210 | p03722 | C++ | // Template
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <functional>
#include <numeric>
#include <list>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
using namespace std;
const int MOD = 1000000007;
#define v_exists(elem, v) find(v.begin(),v.end(),elem)!=v... | a.cc: In function 'int main()':
a.cc:53:9: error: 'dist' was not declared in this scope
53 | dist[i] = INF;
| ^~~~
|
s639361643 | p03722 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define eps LDBL_EPSILON
#define moder 1000000007
#define int long long
#define ll long long
#define INF LLONG_MAX/3
#define P std::pair<int,int>
#define prique priority_queue<int,vector<int>,greater<int>>
using namespace std;
struct edge{int from,t... | a.cc: In function 'bool check()':
a.cc:36:36: error: 'i' was not declared in this scope
36 | if(i>=n-1)return true;
| ^
|
s156626553 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n,m;cin>>n>>m;
ll in=-10000000000;
ll a[m],b[m],c[m];
vector<pair<ll,ll>>list[n+1];
for(ll i=0;i<m;i++){
cin>>a[i]>>b[i]>>c[i];
list[a[i]].push_back(make_pair(b[i],c[i]));
}
ll score[n+1];
//cout<<list[1][1].f... | a.cc: In function 'int main()':
a.cc:30:8: error: 'i' was not declared in this scope
30 | if(i==n-2)ans=score[n];
| ^
a.cc:31:10: error: 'i' was not declared in this scope
31 | if(i>=n-1&&score[n]>ans){
| ^
a.cc: At global scope:
a.cc:37:3: error: 'cout' does not name a type
... |
s623964087 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n,m;cin>>n>>m;
ll in=-10000000000;
ll a[m],b[m],c[m];
vector<pair<ll,ll>>list[n+1];
for(ll i=0;i<m;i++){
cin>>a[i]>>b[i]>>c[i];
list[a[i]].push_back(make_pair(b[i],c[i]));
}
ll score[n+1];
//cout<<list[1][1].f... | a.cc: In function 'int main()':
a.cc:46:21: error: no match for 'operator[]' (operand types are 'bool [(n + 1)]' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'})
46 | ... |
s959776933 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n,m;cin>>n>>m;
ll in=-10000000000;
ll a[m],b[m],c[m];
vector<pair<ll,ll>>list[n+1];
for(ll i=0;i<m;i++){
cin>>a[i]>>b[i]>>c[i];
list[a[i]].push_back(make_pair(b[i],c[i]));
}
ll score[n+1];
//cout<<list[1][1].f... | a.cc:53:3: error: expected declaration before '}' token
53 | }
| ^
a.cc:54:3: error: 'cout' does not name a type
54 | cout<<score[n]<<endl;
| ^~~~
a.cc:55:1: error: expected declaration before '}' token
55 | }
| ^
|
s849138065 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MIN -100000000000000000
#define INF 100000000000000000
ll n,m;
bool ab;
vector<ll> d;
vector<ll> b;
vector<vector<ll>> a,c;
void daiku(ll i){
b[i]++;
for(ll j:a[i]){
if(c[i][j]+d[i]>d[j]){
if(b[j]<1){
d[j]=c[i][j]+d[i];
... | a.cc: In function 'int main()':
a.cc:49:11: error: 'ma' was not declared in this scope; did you mean 'm'?
49 | cout<<ma;
| ^~
| m
|
s151135176 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MIN -100000000000000000
#define INF 100000000000000000
ll n,m,;
vector<ll> d;
vector<ll> b;
vector<vector<ll>> a,c;
void daiku(ll i){
b[i]++;
for(ll j:a[i]){
if(c[i][j]+d[i]>d[j]){
if(b[j]<1){
d[j]=c[i][j]+d[i];
daik... | a.cc:6:8: error: expected unqualified-id before ';' token
6 | ll n,m,;
| ^
|
s567890453 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MIN -100000000000000000
#define INF 100000000000000000
ll n,m;
vector<ll> d,dd;
vector<ll> b;
vector<vector<ll>> a,c;
void daiku(ll i){
b[i]++;
for(ll j:a[i]){
if(c[i][j]+d[i]>d[j]){
if(b[i]<1){
d[j]=c[i][j]+d[i];
da... | a.cc: In function 'int main()':
a.cc:54:3: error: 'cnt' was not declared in this scope; did you mean 'int'?
54 | cnt=0;
| ^~~
| int
|
s650880153 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double dd;
const int INF = 1e9;
int n, m;
vector<map<int,ll>> mp(1001);
bool used[1001] = {};
bool if_inf = false;
ll ans = -1e18;
void dfs(int k, ll dd) {
if (used[k]) {
if_inf = true;
return;
}
if (k == n) {
ans = max(ans,... | a.cc: In function 'void dfs(int, ll)':
a.cc:22:14: error: expected ';' before '&' token
22 | for (auto p& : mp[k]) {
| ^
| ;
a.cc:22:16: error: expected primary-expression before ':' token
22 | for (auto p& : mp[k]) {
| ^
a.cc:22:15: error: expected '... |
s009644886 | p03722 | C++ | #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
//
#define int long long
#define ALL(x) (x).begin(), (x).end()
#define UNIQUE(v) (v).erase(unique((v).begin(), (v).end()), (v).end());
#define m0(x) memset((x), 0, sizeof(x))
#define mm(x) memset((x), -1, sizeof(x))
... | a.cc: In function 'int main()':
a.cc:110:24: error: 'end5l' was not declared in this scope
110 | cout << "inf" << end5l;
| ^~~~~
|
s938376361 | p03722 | Java | import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
class Main{
static int[][] map ;
static long INF =Long.MAX_VALUE/2;
static int n,m ;
static long[] dis;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); //文字の入力
n = sc.nextInt();
m = sc.nextInt... | Main.java:103: error: cannot find symbol
ans = Math.max(ans,score);
^
symbol: variable ans
location: class Main
Main.java:103: error: cannot find symbol
ans = Math.max(ans,score);
^
symbol: variable ans
location: class Main
2 errors
|
s517726142 | p03722 | C++ | inf = int(1e20)
node,edge = map(int,input().split())
ed = []
for e in range(edge):
ed.append(e[0]-1,e[1]-1,-e[2])
start = 0
goal = node-1
d = [inf for i in range(node)]
pre = [inf for i in range(node)]
d[start] = 0
for i in range(node):
update = False
for e in ed:
if d[e[0]] != inf and d[e[1]]>d... | a.cc:33:15: warning: multi-character character constant [-Wmultichar]
33 | print('inf')
| ^~~~~
a.cc:1:1: error: 'inf' does not name a type; did you mean 'int'?
1 | inf = int(1e20)
| ^~~
| int
|
s158184856 | p03722 | C++ | #include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define IREP(i, n) IFOR(i,0,n)
#define SORT(a) sort(a.begin(), a.end())
#define REVERSE(a) reverse(a.begin(), a.end())
#define Lower_bound(v, x) d... | a.cc: In function 'int main()':
a.cc:166:22: error: expected ';' before 'cout'
166 | G.bellman_ford(0)
| ^
| ;
167 | cout << -1 * G.d[N - 1];
| ~~~~
|
s148390636 | p03722 | C++ | void solve(istream &ccin = cin, ostream &ccout = cout) {
ll n, m;
ccin >> n >> m;
vector<Edge> edges;
rep(i, m) {
ll a, b, c;
ccin >> a >> b >> c;
--a;
--b;
edges.emplace_back(a, b, -c);
}
ccout << "inf" << endl;
}
int main() {
ios::sync_with_stdio(false);
solve();
return 0;
} | a.cc:1:6: error: variable or field 'solve' declared void
1 | void solve(istream &ccin = cin, ostream &ccout = cout) {
| ^~~~~
a.cc:1:12: error: 'istream' was not declared in this scope
1 | void solve(istream &ccin = cin, ostream &ccout = cout) {
| ^~~~~~~
a.cc:1:21: error: 'ccin' was... |
s010072828 | p03722 | C++ | using System;
using System.Collections.Generic;
class Program{
static List<long>[] li;
static int[] hf;
static int k=0;
static void Main(){
long[] s=Array.ConvertAll(Console.ReadLine().Split(),long.Parse);
long[] h=new long[s[0]+1];
hf=new int[s[0]+1];
for(int i=1;i<=s[0];i++){h[i]=long.MinValue;}
h[1]=0;... | 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.Collections.Generic;
| ^~~~~~
a.cc:4:16: error: 'List' does not name a type
4 | static List<long>[] li;
... |
s146436368 | p03722 | C++ | #include<bits/stdc++.h>
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define ALL(x) x.begin(),x.end()
#define EPS (1e-8)
#define equals(a,b) (fabs((a)-(b))<EPS)
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
inline bool LT(double a,double b) { return !equals(a,b) && a < ... | a.cc: In function 'int main()':
a.cc:88:4: error: expected '}' at end of input
88 | }
| ^
a.cc:66:12: note: to match this '{'
66 | int main() {
| ^
|
s052504607 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 50;
int n, m;
int a[2000], b[2000];
ll c[2000]
ll dist[2000];
int main(){
cin >> n >> m;
for (int i = 0; i < m; i++){
cin >> a[i] >> b[i] >> c[i];
a[i]--; b[i]--;
c[i] = -c[i];
}
for (in... | a.cc:10:1: error: expected initializer before 'll'
10 | ll dist[2000];
| ^~
a.cc: In function 'int main()':
a.cc:15:32: error: 'c' was not declared in this scope
15 | cin >> a[i] >> b[i] >> c[i];
| ^
a.cc:21:9: error: 'dist' was not declared in this scope
21 |... |
s986917677 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define REP(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, a, b) for(int i=(a); i<(b); ++i)
#define FORR(i, a, b) for... | a.cc: In function 'int main()':
a.cc:87:9: error: expected initializer before 'll'
87 | ll c;
| ^~
a.cc:93:25: error: 'b' was not declared in this scope
93 | cin>>a>>b>>c;
| ^
a.cc:93:28: error: 'c' was not declared in this scope
93 | ... |
s639468919 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
#include <stack>
#include <queue>
#include <deque>
#include <numeric>
#define MAX 100000007
using namespace std;
using ll = long long;... | a.cc: In function 'int main()':
a.cc:38:5: error: 'dist' was not declared in this scope
38 | dist[i]=MAX;
| ^~~~
a.cc:40:3: error: 'dist' was not declared in this scope
40 | dist[0]=0;
| ^~~~
a.cc:43:16: error: 'INF' was not declared in this scope
43 | if(a[i]==INF) continue;
... |
s703814392 | p03722 | C++ | include<cstdio>
int main(){
printf("inf\n");
} | a.cc:1:1: error: 'include' does not name a type
1 | include<cstdio>
| ^~~~~~~
|
s255848696 | p03722 | C++ | int main(){
printf("inf\n");
} | a.cc: In function 'int main()':
a.cc:2:1: error: 'printf' was not declared in this scope
2 | printf("inf\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main(){
|
s349638007 | p03722 | C++ | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <string>
#include <set>
#include <map>
#define REP(i,n) for(ll i = 0; i < (ll)n; i++)
#define INF 10000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
s... | a.cc: In function 'int main()':
a.cc:74:21: error: no matching function for call to 'graph::negative_loop()'
74 | if(g.negative_loop()){
| ~~~~~~~~~~~~~~~^~
a.cc:51:8: note: candidate: 'bool graph::negative_loop(ll)'
51 | bool negative_loop(ll gl){
| ^~~~~~~~~~~~~
a.cc:51:8: note: ca... |
s635027566 | p03722 | C++ | #include "stdafx.h"
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#in... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s512236774 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <limits>
using namespace std;
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
using Weight = int64_t;
struct Edge {
int src, dst;
Weight weight;
};
constexpr int64_t INF = 1LL<<59;
using Edges = vector<Edge>... | a.cc: In function 'int main()':
a.cc:50:13: error: 'dist' was not declared in this scope
50 | if (dist[N - 1] > -INF) {
| ^~~~
|
s995511799 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
using namespace std;
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
using Weight = int64_t;
struct Edge {
int src, dst;
Weight weight;
};
using Edges = vector<Edge>;
using Graph = vector<Edges>;
bool shortestPath(co... | a.cc: In function 'bool shortestPath(Graph, int, std::vector<long int>&, std::vector<int>&)':
a.cc:23:18: error: 'INF' was not declared in this scope
23 | dist.assign(n, INF+INF); dist[s] = 0;
| ^~~
|
s268034177 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#include <string>
#include <map>
#include <math.h>
#include <set>
using namespace std;
typedef long long ll;
#define rep(i,s,n)for(ll i=s;i<n;i++)
#define repe(i,s,n)for(ll i=s;i<=n;i++)
static const double PI = 3.1415926535897932384626433;
static const ll I... | a.cc: In function 'int main()':
a.cc:162:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
162 | return;
| ^~~~~~
|
s510002259 | p03722 | C++ | #include <iostream>
#include <string>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <utility>
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
const int... | a.cc: In function 'bool bellmanford()':
a.cc:42:68: error: 'e' was not declared in this scope
42 | if(e.to == n - 1)updated = true;
| ^
|
s417856404 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MAX = 1e+15;
typedef struct{
ll s;
ll t;
ll c;
} edge;
ll n,m;
vector<vector<edge>> g,ig,subg;
ll longest_path() {
vector<int> indeg(n,0);
for(auto es : subg) {
for(auto e : es) {
indeg[e.t]++;
}
}
stack<int> L; L.pu... | In file included from /usr/include/c++/14/string:49,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(con... |
s056767410 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MAX = 1e+15;
typedef struct{
ll s;
ll t;
ll c;
} edge;
ll n,m;
vector<vector<edge>> g,ig,subg;
ll longest_path() {
vector<int> indeg(n,0);
for(auto es : subg) {
for(auto e : es) {
indeg[e.t]++;
}
}
stack<int> L; L.pu... | a.cc: In function 'void solve()':
a.cc:80:18: error: expected primary-expression before ',' token
80 | cout << ans <, endl;
| ^
In file included from /usr/include/c++/14/string:49,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/... |
s274600648 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MAX = 1e+15;
typedef struct{
ll s;
ll t;
ll c;
} edge;
ll n,m;
vector<vector<edge>> g,ig,subg;
ll longest_path() {
vector<int> indeg(n,0);
for(auto es : subg) {
for(auto e : es) {
indeg[e.t]++;
}
}
stack<int> L; L.pu... | a.cc: In function 'll longest_path()':
a.cc:27:18: error: 'sung' was not declared in this scope; did you mean 'subg'?
27 | for(auto e : sung[v]) {
| ^~~~
| subg
a.cc: In function 'void make_subg()':
a.cc:61:18: error: 'traverse' was not declared in this scope; did yo... |
s742025628 | p03722 | Java | import java.util.*;
public class Main {
static int modP = 1000000007;
static long inf = Long.MAX_VALUE;
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int m = in.nextInt();
List<E> edges = new ArrayList<>();
f... | Main.java:10: error: cannot find symbol
List<E> edges = new ArrayList<>();
^
symbol: class E
location: class Main
Main.java:15: error: cannot find symbol
E e = new E(a, b, c);
^
symbol: class E
location: class Main
Main.java:15: error: cannot find symbol
... |
s455899109 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef lon glong ll;
ll MAX = 1e+15;
typedef struct{
ll t;
ll c;
} edge;
ll n,m;
vector<vector<edge>> g,subg;
ll longest_path() {
vector<int> indeg(n,0);
for(auto es : subg) {
for(auto e : es) {
indeg[e.t]++;
}
}
while(1) {
int v = -1;... | a.cc:3:9: error: 'lon' does not name a type; did you mean 'long'?
3 | typedef lon glong ll;
| ^~~
| long
a.cc:4:1: error: 'll' does not name a type
4 | ll MAX = 1e+15;
| ^~
a.cc:6:3: error: 'll' does not name a type
6 | ll t;
| ^~
a.cc:7:3: error: 'll' does not na... |
s002948700 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef lon glong ll;
typedef struct{
ll t;
ll c;
} edge;
ll n,m;
vector<edge> g;
int main() {
cin >> n >> m;
g = vector<edge>(n);
for(int i=0; i<n; i++) {
ll a,b,c; cin >> a >> b >> c;
a--;b--;
g[a].push_back({b,c});
g[b].push_back({a,c});
}... | a.cc:3:9: error: 'lon' does not name a type; did you mean 'long'?
3 | typedef lon glong ll;
| ^~~
| long
a.cc:6:3: error: 'll' does not name a type
6 | ll t;
| ^~
a.cc:7:3: error: 'll' does not name a type
7 | ll c;
| ^~
a.cc:10:1: error: 'll' does not name a ... |
s278305934 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define NDEBUG
#ifdef DEBUG
#include "../cout11.h"
#undef NDEBUG
#endif
#include <cassert>
typedef long long ll;
typedef long double Double;
typedef unsigned long long ull;
typedef pair<int,int> ii;
typedef pair<ll,ll> llll;
typedef pair<double,double> dd;
typedef vector... | a.cc: In function 'void solve(int, int, vi&, vi&, vi&)':
a.cc:75:33: error: 's' was not declared in this scope
75 | cout << "inf" <<s endl;
| ^
|
s677624276 | p03722 | C++ | #include <bits/stdc++.h>
using namespace std;
#define NDEBUG
#ifdef DEBUG
#include "../cout11.h"
#undef NDEBUG
#endif
#include <cassert>
typedef long long ll;
typedef long double Double;
typedef unsigned long long ull;
typedef pair<int,int> ii;
typedef pair<ll,ll> llll;
typedef pair<double,double> dd;
typedef vector... | a.cc: In function 'void solve(int, int, vi&, vi&, vi&)':
a.cc:62:39: error: 's' was not declared in this scope
62 | q.push( make_pair(0LL,ii(-1,0)) );s
| ^
|
s932415219 | p03722 | C++ | #include <iostream>
#include <vector>
#include <utility>
using namespace std;
using llong = long long;
int main(){
int n,m;
cin >> n >> m;
vector<vector<pair<int,llong>>> graph(n);
for(int i=0;i<m;++i){
int a,b;
llong c;
cin >> a >> b >> c;
graph[a-1].emplace_back(b-1,-c);
}
llong INF = 1... | a.cc: In function 'int main()':
a.cc:27:24: error: lvalue required as left operand of assignment
27 | if(cnt == n-1&&p.first = n-1){
| ~~~~~~~~~~^~~~~~~~~
|
s733744042 | p03722 | C++ | #include <iostream>
using namespace std;
int main(){
long long a,b,c;
cin >> V >> E;
int i,j;
for(i=0;i<E;i++){
cin >> a >> b >> c ;
}
cout << "inf" << endl;
}
| a.cc: In function 'int main()':
a.cc:7:16: error: 'V' was not declared in this scope
7 | cin >> V >> E;
| ^
a.cc:7:21: error: 'E' was not declared in this scope
7 | cin >> V >> E;
| ^
|
s898031284 | p03722 | C++ | #include<cstdio>
#include<cstring>
#include<vector>
#include<queue>
#include<algorithm>
#include<cmath>
#include<climits>
#include<string>
#include<set>
#include<numeric>
#include<map>
#include<iostream>
using namespace std;
#define rep(i,n) for(int i = 0;i<((int)(n));i++)
#define reg(i,a,b) for(int i = ((int)(a));i<=(... | a.cc: In function 'int main()':
a.cc:42:20: error: 'i' was not declared in this scope
42 | if(i==N-1)t=s2[N];
| ^
|
s011256595 | p03722 | C++ | #include <iostream>
#include <vector>
#include<algorithm>
#include<iomanip>
#include<queue>
#include<deque>
#include<map>
#include<bitset>
#include<math.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,m,n) for(ll i=m;i<(ll)(n);i++)
typedef pair<int,long long> pint;
typedef long long ll;... | a.cc: In function 'void bfs()':
a.cc:31:13: error: 'n' was not declared in this scope
31 | if(x==n-1){
| ^
|
s819174463 | p03722 | C++ | n,m=io.read("*n","*n")
d={}
for i=1,n do
d[i]={}
for j=1,n do
d[i][j]=(i==j and 0 or -1e15)
end
end
for i=1,m do
a,b,c=io.read("*n","*n","*n")
d[a][b]=c
end
for k=1,n do
for i=1,n do
for j=1,n do
d[i][j]=math.max(d[i][j],d[i][k]+d[k][j])
end
end
end
print(d[1][1]>0 and"inf"or d[1][n]) | a.cc:1:1: error: 'n' does not name a type
1 | n,m=io.read("*n","*n")
| ^
a.cc:3:1: error: expected unqualified-id before 'for'
3 | for i=1,n do
| ^~~
a.cc:5:9: error: expected unqualified-id before 'for'
5 | for j=1,n do
| ^~~
|
s058243193 | p03722 | C++ | #[allow(dead_code)]
fn getline() -> String {
let mut res = String::new();
std::io::stdin().read_line(&mut res).ok();
res
}
#[allow(unused_macros)]
macro_rules! readl {
($t: ty) => {
{
let s = getline();
s.trim().parse::<$t>().unwrap()
}
};
($( $t: ty),+ )... | a.cc:1:2: error: invalid preprocessing directive #[
1 | #[allow(dead_code)]
| ^
a.cc:8:2: error: invalid preprocessing directive #[
8 | #[allow(unused_macros)]
| ^
a.cc:25:2: error: invalid preprocessing directive #[
25 | #[allow(unused_macros)]
| ^
a.cc:36:2: error: invalid preprocessin... |
s707755851 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <functional>
typedef long long ll;
using namespace std;
class Edge
{
public:
ll cost;
int next;
Edge(int n,ll c)
{
next=n;
cost=c;
}
};
vector<Edge> g[1000];
bool used[1000];
ll d[1000];
ll inf = 1e15+7;... | a.cc: In function 'int main()':
a.cc:68:9: error: 'assert' was not declared in this scope
68 | assert(true);
| ^~~~~~
a.cc:7:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
6 | #include <functional>
+++ |+#include <cassert>
7... |
s081790997 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
const long long int INF = 1LL << 50;
const int nmax = 1001;
const int mmax = 2001;
struct edge {
int from,to;
long long int cost;
};
edge es[2010];
int a[mmax],b[mmax];
long long int c[namx];
long long int d[nmax];
int n,m;
int main(){
int s,t;
long lo... | a.cc:16:17: error: 'namx' was not declared in this scope; did you mean 'nmax'?
16 | long long int c[namx];
| ^~~~
| nmax
a.cc: In function 'int main()':
a.cc:29:32: error: 'c' was not declared in this scope
29 | cin >> a[i] >> b[i] >> c[i];
| ... |
s089922117 | p03722 | C++ | #include<iostream>
using namespace std;
using ll = long long;
const ll INF = 1LL << 50;
int main(){
int n,m;
cin >> n >> m;
const int nmax = 1000;
const int mmax = 2000;
int a[mmax],b[mmax];
ll c[mmax];
for(int i=0; i<m; i++){
cin >> a[i] >> b[i] >> c[i];
c[i] = -c[i];
}
ll d[nmax];
f... | a.cc: In function 'int main()':
a.cc:51:9: error: 'dist' was not declared in this scope
51 | if (dist[a[i] - 1] == INF) continue;
| ^~~~
a.cc:52:9: error: 'dist' was not declared in this scope
52 | if (dist[b[i] - 1] > dist[a[i] - 1] + c[i]) {
| ^~~~
|
s756227180 | p03722 | C++ | #include<iostream>
using namespace std;
using ll = long long;
const ll INF = 1LL << 50;
int main(){
int n,m;
cin >> n >> m;
const int nmax = 1000;
const int mmax = 2000;
int a[mmax],b[mmax];
ll c[mmax];
for(int i=0; i<m; i++){
cin >> a[i] >> b[i] >> c[i];
c[i] = -c[i];
}
ll d[nmax];
f... | a.cc: In function 'int main()':
a.cc:43:17: error: 'NMAX' was not declared in this scope
43 | bool negative[NMAX];
| ^~~~
a.cc:45:23: error: 'N' was not declared in this scope
45 | for (int i = 0; i < N; ++i) {
| ^
a.cc:46:5: error: 'negative' was not declared... |
s408168773 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
#define INF 1LL << 50;
struct edge {long long int from,to,cost;};
edge es[2010];
long long int d[1010];
long long int n,m;
bool shortest_path(long long int s){
for(int i=0; i<=n; i++){
d[i] = INF;
}
d[s] = 0;
long long int count = 0;
while(1)... | a.cc: In function 'bool shortest_path(long long int)':
a.cc:26:38: error: expected ')' before '[' token
26 | if(d[ed.from] != INF && d[ed.to] > d[ed.from] + ed.cost){
| ~ ^
| )
a.cc:26:37: error: label 'd' used but not de... |
s736429416 | p03722 | C++ | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define p(s) cout<<(s)<<endl
#define REP(i,n,N) for(int i=n;i<N;i++)
#define RREP(i,n,N) ... | a.cc:22:16: error: 'LONG_LONG_MAX' was not declared in this scope
22 | const ll inf = LONG_LONG_MAX/4;
| ^~~~~~~~~~~~~
|
s101506655 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <functional>
#include <stack>
#include <utility>
#include <map>
#include <queue>
#include <set>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1000000007;
const ll INF = LLONG_MAX... | a.cc:19:16: error: 'LLONG_MAX' was not declared in this scope
19 | const ll INF = LLONG_MAX;
| ^~~~~~~~~
a.cc:12:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
11 | #include <set>
+++ |+#include <climits>
12 |
|
s218613545 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define M 1000000007
#define P pair<int,int>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) FOR(i,0,n)
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265
vector<pair<int,ll> > v[1100];
int n,m;
l... | a.cc: In function 'int main()':
a.cc:43:40: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'
43 | pair<int,ll> p = make_pair<int,ll>(b,c);
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/inclu... |
s613042814 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define M 1000000007
#define P pair<int,int>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) FOR(i,0,n)
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265
vector<pair<int,ll> > v[1100];
int n,m;
l... | a.cc: In function 'int main()':
a.cc:43:38: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'
43 | v[a].push_back(make_pair<int,ll>(b,c));
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/... |
s060876672 | p03722 | C++ | #include "bits/stdc++.h"
using namespace std;
#define FOR(i,a,b) for(int i =(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<(n);i++)
#define REPm(i,n) for(int i=(n)-1;i>=0;i--)
#define REP1(i,n) for(int i=1;i<=(n);i++)
typedef long long ll;
struct edge{
int v; //行き先
ll d; //重み
};
#define inf 1e15
#define MAX_N 10... | a.cc: In function 'int main()':
a.cc:37:19: error: 'N_MAX' was not declared in this scope; did you mean 'NL_NMAX'?
37 | bool isNcycle[N_MAX] = {};
| ^~~~~
| NL_NMAX
a.cc:39:13: error: 'isNcycle' was not declared in this scope
39 | if(!isNcycle){
| ... |
s529611376 | p03722 | C++ | #include <iostream>
#include <climits>
#define INF (LLONG_MAX>>2);
using namespace std;
typedef long long ll;
const int nlimit=1005;
int n, m;
int a[nlimit], b[nlimit];
ll c[nlimit];
void solve();
int main(){
cin >> n >> m;
ll tempc;
for(int i=1; i<=m; i++){
cin >> a[i] >> b[i] >> tempc;
c[i] = -tempc;... | a.cc: In function 'void solve()':
a.cc:34:33: error: expected ')' before '[' token
34 | if(dist[a[j]]!=INF && dist[b[j]] > dist[a[j]] + c[j]){
| ~ ^
| )
a.cc:45:33: error: expected ')' before '[' token
45 | if(dist[a[j]]!=INF &&... |
s910785171 | p03722 | C++ | #include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<deque>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define ll __int64
//#define ll lo... | a.cc:16:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
16 | #define ll __int64
| ^~~~~~~
a.cc:18:16: note: in expansion of macro 'll'
18 | #define P pair<ll,ll>
| ^~
a.cc:20:8: note: in expansion of macro 'P'
20 | vector<P>G[1100];
| ... |
s652896478 | p03722 | C++ | #include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<deque>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define ll __int64
//#define ll lo... | a.cc:16:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
16 | #define ll __int64
| ^~~~~~~
a.cc:18:16: note: in expansion of macro 'll'
18 | #define P pair<ll,ll>
| ^~
a.cc:20:8: note: in expansion of macro 'P'
20 | vector<P>G[1100];
| ... |
s189501618 | p03722 | C++ | #include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<deque>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define ll __int64
//#define ll lo... | a.cc:16:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
16 | #define ll __int64
| ^~~~~~~
a.cc:18:16: note: in expansion of macro 'll'
18 | #define P pair<ll,ll>
| ^~
a.cc:20:8: note: in expansion of macro 'P'
20 | vector<P>G[1100];
| ... |
s020805661 | p03722 | C++ | #include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<deque>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define ll __int64
//#define ll lo... | a.cc:16:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
16 | #define ll __int64
| ^~~~~~~
a.cc:18:16: note: in expansion of macro 'll'
18 | #define P pair<ll,ll>
| ^~
a.cc:20:8: note: in expansion of macro 'P'
20 | vector<P>G[1100];
| ... |
s242984993 | p03722 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<int, int> P;
typedef pair<ll, P> E;
#define cost first
#define from second.first
#define to second.second
#define MOD (1000000007ll)
#define l_ength size
void mul_mod(ll& a, ll b){
a *= b;
a %... | a.cc:74:9: error: expected unqualified-id before 'return'
74 | return 0;
| ^~~~~~
a.cc:75:1: error: expected declaration before '}' token
75 | }
| ^
|
s748445788 | p03722 | C++ | #include <vector>
#include <iostream>
#include <utility>
using namespace std;
struct Edge {
int from;
int to;
int cost;
};
const long long inf = 1e18;
long long n, m;
bool has_neg_loop(long long n, const vector<Edge> &edges) {
bool f = false;
vector<long long> dist(n,0);
for (int i=0; i<n; ... | a.cc: In function 'int main()':
a.cc:53:29: error: 'INF' was not declared in this scope
53 | assert(distance[n-1] != INF);
| ^~~
a.cc:53:5: error: 'assert' was not declared in this scope
53 | assert(distance[n-1] != INF);
| ^~~~~~
a.cc:4:1: note: 'assert' is def... |
s006087678 | p03722 | C++ | #include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <random>
#include <utility>
#include <string.h>
#include <iomanip>
#include <stdlib.h>
#include <algorithm>
using namespace std;
typedef pair<int,int> P;
long long int INF = 9223372036854775806/2;
double Pi = 3.141592653... | In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/includ... |
s450733300 | p03722 | C++ | long long inf=100000000000007;
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
typedef pair<int,int> P;
string alph("abcdefghijklmnopqrstuvwxyz");
struct edge{int from,to,cost;};
vector<edge> G;
vector<int> O[10];
P sg[10];
int d[1005];
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
pair<int,double> s[1005];
... | a.cc:4:9: error: 'pair' does not name a type
4 | typedef pair<int,int> P;
| ^~~~
a.cc:5:1: error: 'string' does not name a type
5 | string alph("abcdefghijklmnopqrstuvwxyz");
| ^~~~~~
a.cc:7:1: error: 'vector' does not name a type
7 | vector<edge> G;
| ^~~~~~
a.cc:8:1: error: 'vec... |
s814306774 | p03722 | C++ |
#include <numeric>
#include<iostream>
#include<set>
#include<queue>
#include<vector>
#include<map>
#include<stack>
#include<algorithm>
#include <sstream>
#include<string>
using namespace std;
long long inf=100000000000007;
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
typedef pair<int,int> P;
string alp... | a.cc: In function 'bool find_nega()':
a.cc:52:5: error: 'memset' was not declared in this scope
52 | memset(dn,0,sizeof(dn));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include <sstream>
+++ |+#include <cstring... |
s881575567 | p03722 | C++ | #include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <unordered_set>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
static const int INF = 1000010000;
static const int NIL = -1;
static const... | a.cc: In function 'int main()':
a.cc:85:7: error: 'assert' was not declared in this scope
85 | assert(flag == -2);
| ^~~~~~
a.cc:10:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
9 | #include <unordered_set>
+++ |+#include <cassert>... |
s917185479 | p03722 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> mat;
#define FOR(i,a,b) for(int (i)=(a);i<(int)(b);i++)
#define rep(i,n) FOR(i,0,n)
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define mset(a,x) memset(a,x,sizeof(a))
#define... | a.cc:22:16: error: 'union_find' has not been declared
22 | ll dist(int s, union_find uf) {
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:54:5: error: 'union_find' was not declared in this scope
54 | union_find uf(n);
| ^~~~~~~~~~
a.cc:60:9: error: 'uf' was not declared in th... |
s563180817 | p03722 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<string>
#define INF 2000000000
using namespace std;
typedef pair<ll,ll> P;
typedef long long ll;
typedef pair<P,ll> PP;
int n,m;
vector<PP> e;
ll d[1050];
bool bellman_ford(int s)
{
fill(d,d+n,INF);
d[s]=0;
for(int k... | a.cc:11:14: error: 'll' was not declared in this scope
11 | typedef pair<ll,ll> P;
| ^~
a.cc:11:17: error: 'll' was not declared in this scope
11 | typedef pair<ll,ll> P;
| ^~
a.cc:11:19: error: template argument 1 is invalid
11 | typedef pair<ll,ll> P;
| ... |
s217850970 | p03722 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<functional>
#include<queue>
#include<map>
#include<limits>
#include<cmath>
#include<algorithm>
#include<bitset>
#include<utility>
#include<complex>
#include<cstdlib>
#include<set>
#include<cctype>
#define DBG cerr << '!' << endl;
#define RE... | a.cc: In function 'bool BF(int, int, int)':
a.cc:59:9: error: 'else' without a previous 'if'
59 | else return true;
| ^~~~
|
s864623475 | p03722 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1LL << 60;
struct edge {
ll from, to, cost;
};
bool bellman_ford(const int v, const int s, vector<edge> es, vector<ll>& dist) {
vector<ll> d(v, INF);
d[s] = 0;
bool neg_loop = false;
for(int cnt=0; ;cnt++) {
... | a.cc: In function 'bool bellman_ford(int, int, std::vector<edge>, std::vector<long long int>&)':
a.cc:24:42: error: 'N' was not declared in this scope
24 | if(cnt >= v-1 && e.to == N-1) return true;
| ^
|
s246583855 | p03722 | C++ | #include <bits/stdc++.h>
#define INF 1234567890123LL
#define MN 1001
using namespace std;
typedef long long ll;
typedef pair<int, ll> arc;
ll dist[MN];
vector<arc> es[MN];
int prev[MN];
int main()
{
int n, m;
cin >> n >> m;
for(int i=0; i<m; i++)
{
int a, b;
ll c;
cin >> a >>... | a.cc: In function 'int main()':
a.cc:37:21: error: reference to 'prev' is ambiguous
37 | prev[itr->first] = i;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
from /usr/incl... |
s475324822 | p03722 | C++ | #include<algorithm>
#define MM 20000000000000000
using namespace std;
int main(void)
{
int n,m,flg[1001],a[2000],b[2000],c[2000],i,j;
long long leng[1001];
scanf("%d %d",&n,&m);
for(i=0;i<m;i++) {
scanf("%d %d %d",&a[i],&b[i],&c[i]);
c[i]=-c[i];
}
for(i=1;i<=n;i++) leng[i]=2000000000000000000;
leng[1]=0;
fo... | a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf' was not declared in this scope
8 | scanf("%d %d",&n,&m);
| ^~~~~
a.cc:27:25: error: 'printf' was not declared in this scope
27 | if(flg[n]==1) printf("inf\n");
| ^~~~~~
a.cc:2:1: note: 'printf' ... |
s918185924 | p03722 | C++ | #include<bits/stdc++.h>
#define INF 2100000000
#define LL long long int
using namespace std;
LL node[1010],i,j,k,n,m,a[1010],b[1010],c[1010],sco[1010]={INF},size[1010],x,y,
check[1010]={0},sco2[1010]={INF},start,gorl;
int root(int x){
if(x!=node[x]){
node[x]=root(node[x]);
return node[x];
}
else return x;
}
i... | a.cc: In function 'int main()':
a.cc:22:27: error: reference to 'size' is ambiguous
22 | for(i=1;i<=n;i++) size[i]=1,node[i]=i;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.