submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s545129681
p03994
C++
#include <iostream> using namespace std; int main(){ string s; cin >> s; int K; cin >> K; for(unsigned int i = 0; i < s.size(); i++){ if(s[i] == 'a') continue; if(K >= long long('z' - s[i] + 1)){ K -= long long('z' - s[i] + 1); s[i] = 'a'; } } K = K % 26; while(K > 0){ s...
a.cc: In function 'int main()': a.cc:11:13: error: expected primary-expression before 'long' 11 | if(K >= long long('z' - s[i] + 1)){ | ^~~~ a.cc:11:12: error: expected ')' before 'long' 11 | if(K >= long long('z' - s[i] + 1)){ | ~ ^~~~~ | ) a.cc:12:12: er...
s304556773
p03994
C++
#include <stdio.h> #include <string.h> void solve(int k, char*c); int main(){ int k; char s[100001]; fgets(s, sizeof(s), stdin); scanf_s("%d", &k); solve(k, s); return 0; } void solve(int k, char*c) { for (int i = 0; i < strlen(c); ++i) { if (c[i] != 'a' && k > 'z' - c[i]) { k -= 'z' - c[i] +...
a.cc: In function 'int main()': a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 8 | scanf_s("%d", &k); | ^~~~~~~ | scanf
s953568080
p03994
C++
#include <stdio.h> #include <string.h> void solve(int k, char*c); int main(){ char s[100001]; gets_s(s); int K; scanf_s("%d", &K); solve(K, s); return 0; } void solve(int k, char*c) { for (int i = 0; i < strlen(c); ++i) { if (c[i] != 'a' && k > 'z' - c[i]) { k -= 'z' - c[i] + 1; c[i] = 'a'; } } if (k...
a.cc: In function 'int main()': a.cc:6:9: error: 'gets_s' was not declared in this scope 6 | gets_s(s); | ^~~~~~ a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 8 | scanf_s("%d", &K); | ^~~~~~~ | scanf
s032361881
p03994
C++
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; void solve() { String s = ns()...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.ByteArrayInputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wit...
s894590973
p03994
C++
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; void solve() { String s = ns()...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.ByteArrayInputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wit...
s233943596
p03994
C++
#include <stdio.h> #include <string.h> void solve(int k, char*c); int main(){ int k; char s[100001]; fgets(s, sizeof(s), stdin); scanf("%d", &k); solve(K, s); return 0; } void solve(int k, char*c) { for (int i = 0; i < strlen(c); ++i) { if (c[i] != 'a' && k > 'z' - c[i]) { k -= 'z' - c[i] + 1...
a.cc: In function 'int main()': a.cc:9:15: error: 'K' was not declared in this scope 9 | solve(K, s); | ^
s958475097
p03994
C++
#include <stdio.h> #include <string.h> void solve(int k, char*c); int main(){ int K; char s[100001]; fgets(s, sizeof(s), stdin); scanf("%d", &k); solve(K, s); return 0; } void solve(int k, char*c) { for (int i = 0; i < strlen(c); ++i) { if (c[i] != 'a' && k > 'z' - c[i]) { k -= 'z' - c[i] + 1...
a.cc: In function 'int main()': a.cc:8:22: error: 'k' was not declared in this scope 8 | scanf("%d", &k); | ^
s322662717
p03994
C++
#include <stdio.h> #include <string.h> int main(){ char s[100001]; gets(s); int K; scanf("%d", &K); int sLength = strlen(s); //printf("K = %d\r\n", K); for (int i = 0; i < sLength-1; i++){ //printf("s[%d] = %c\r\n", i, s[i]); if (s[i] != 'a' && (int)('a' + 26 - s[i]) <= K){ //printf("%d <= %d is true", (i...
a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(s); | ^~~~ | getw
s024480909
p03994
C++
sl = list(input() ) k = int( input() ) al ="abcdefghijklmnopqrstuvwxyz" alen = len(al) for i in range(0,len(sl) ): p = alen - al.find(sl[i]) if(p<k): sl[i] = 'a' k = k-p #print("k,p:",k,p) if k>0 : p = alen - al.find(sl[-1]) # now position sl[-1] = al[(k-p)%26] # s = "...
a.cc:14:2: error: invalid preprocessing directive #print 14 | #print("k,p:",k,p) | ^~~~~ a.cc:17:33: error: stray '#' in program 17 | p = alen - al.find(sl[-1]) # now position | ^ a.cc:18:38: error: stray '#' in program 18 | sl[-1] = al[(k-p)%26] ...
s780210749
p03994
C++
import bisect import sys import math import itertools sys.setrecursionlimit(10000) INF = float('inf') # input macro def i(): return int(raw_input()) def ii(): return map(int,raw_input().split(" ")) def s(): return raw_input() def ss(): return raw_input().split(" ") def slist(): return list(raw_inp...
a.cc:7:13: warning: multi-character character constant [-Wmultichar] 7 | INF = float('inf') | ^~~~~ a.cc:9:3: error: invalid preprocessing directive #input 9 | # input macro | ^~~~~ a.cc:23:12: error: empty character constant 23 | return ''.join(s) | ^~ a.cc:25:...
s783565215
p03994
C++
#include<bits/stdc++.h> using namespace std; #define sz(x) (int)(x).size() int main() { //freopen("d://i.txt","r",stdin); //freopen("d://o.txt","w",stdout); string s; int k,i,j,sz1,x,mov; cin>>s>>k; sz1=sz(s); fr(i,0,sz1) { if(i==sz1-1) { if(k>('z'-s[i])) ...
a.cc: In function 'int main()': a.cc:18:4: error: 'fr' was not declared in this scope 18 | fr(i,0,sz1) | ^~
s360064551
p03994
C++
#include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #include <set> #include <functional> #include <map> #include <queue> #include <cmath> #include <string> #include <stack> using namespace std; int main(void){ string str; int K,P,Kcop,i=0; char c; cin >> str >> K; Kcop=K; whil...
a.cc: In function 'int main()': a.cc:18:1: error: 'cin' was not declared in this scope 18 | cin >> str >> K; | ^~~ a.cc:13:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 12 | #include <stack> +++ |+#include <iostream> 13 | using namespace...
s449810853
p03994
C++
#include <iostream> #include <unordered_map> #include <set> using namespace std; int main(int argc, char *argv[]) { string str("codefestival"); int K(100); for (int i = 0; i != str.size(); ++i){ int editN = 'z' - str[i] + 1; if (K - editN >= 0){ str[i] = 'a'; K -= ...
a.cc: In function 'int main(int, char**)': a.cc:25:17: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [2]') 25 | cout << str < "\n"; | ~~~~~~~~~~~ ^ ~~~~ | | | | | const char [2] | std::basic_ostre...
s868706682
p03994
Java
import java.util.Scanner; import java.util.ArrayList; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int K = sc.nextInt(); System.out.println(solve(s, K)); } public static String solve(String s, int K) { char[] chars = s.toCharAr...
Main.java:36: error: cannot find symbol char c = (char)(builder.charAt(lastIndex) + K); ^ symbol: variable builder location: class Main Main.java:37: error: cannot find symbol chars[i] = c; ^ symbol: variable i location: class Main 2 errors
s565109296
p03994
Java
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.text.NumberFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.Map.Entry; import java.util.Scanner; public class Test3 { ...
Main.java:12: error: class Test3 is public, should be declared in a file named Test3.java public class Test3 { ^ 1 error
s922180254
p03994
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main(){ string s; int k; cin>>s>>k; for(int i=0;i!=s.size()-1 && k>0;++i){ if(k<'z'-s[i]+1) continue; else{ k-='z'-s[i]+1; s[i]='a'; } } k...
a.cc: In function 'int main()': a.cc:21:7: error: 'len' was not declared in this scope; did you mean 'mblen'? 21 | s[len-1] = 'a' + (char)(last % 26); | ^~~ | mblen
s222830053
p03994
C++
#include<stdio.h> int a,i; char b[100010]; int main(){ scanf("%s",b); scanf("%d",&a); for(i=0;b[i]!='\0';i++){ if(a>'z'-b[i]){ a=a-('z'-b[i])-1; b[i]='a'; } } b[i-1]=(b[i-1]-'a'+k)%26+'a'; printf("%s",b); }
a.cc: In function 'int main()': a.cc:13:28: error: 'k' was not declared in this scope 13 | b[i-1]=(b[i-1]-'a'+k)%26+'a'; | ^
s234129777
p03994
C++
#include <iostream> #include <algorithm> #include <string> #include <numeric> #include <vector> using namespace std; int main() { long long k; string s; cin >> s >> k; int len = s.length(); for(int i = 0; i < len; i++){ int dif = 26 - (s[i] - 'a'); if(dif <= k){ k -= dif; s[i] = 'a'; } } k = k %...
a.cc: In function 'int main()': a.cc:24:29: error: request for member 'compare' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)(len - 1)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 24 | int l...
s998151921
p03994
C++
#include <iostream> #include <stdio.h> // printf,scanf #include <stdlib.h> #include <math.h> #include <string> #include <vector> #include <algorithm> //sort,binarySearch #include <functional> #include <iomanip> // setprecision #include <utility> // c+11 Array #include <set> #include <sstream> #include <bits/...
a.cc: In function 'int main()': a.cc:37:9: error: expected ',' or ';' before 'if' 37 | if(str[i] != 'a' && t <= cnt){ | ^~
s714483915
p03994
C++
#include <algorithm> #include <vector> #include <cstring> #include <set> #include <functional> #include <map> #include <queue> #include <cmath> #include <string> #include <stack> using namespace std; int main(void){ string str; int K,P,Kcop,i=0; char c; cin >> str >> K; Kcop=K; while(str.size()>i){ P=27-(str[i]-'a'); ...
a.cc: In function 'int main()': a.cc:16:1: error: 'cin' was not declared in this scope 16 | cin >> str >> K; | ^~~ a.cc:11:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 10 | #include <stack> +++ |+#include <iostream> 11 | using namespace...
s469757551
p03994
C++
// #include <bits/stdc++.h> #include<iostream> #include<string> #include<vector> #include<algorithm> #include<functional> #include<cassert> #include<numeric> // std::accumulate(vec.begin(),vec.end(),0) sum of element #include<cmath> #include<cstdio> #include<cstdlib> #include<queue> using namespace std; typedef l...
a.cc: In function 'int main()': a.cc:59:8: error: 'i' was not declared in this scope 59 | rep2(i,s.size()){ | ^ a.cc:59:3: error: 'rep2' was not declared in this scope; did you mean 'rep'? 59 | rep2(i,s.size()){ | ^~~~ | rep
s915988779
p03994
C++
//CODE FESTIVAL 2016 qual A C #include <bits/stdc++.h> using namespace std; int main(){ char s[100005]; for(int i=0; i<100005; i++){ s[i] = 0; } scanf("%s", s); long long k; scanf("%lld", &k); for(int i=0; i<100005; i++){ if(s[i] != 0){ if(123-s[i] <= k){ k -= (123-s[i]); s[i] = 'a'; } } } ...
a.cc:28:22: error: 's' was not declared in this scope 28 | string str = s; | ^ a.cc:29:15: error: expected constructor, destructor, or type conversion before '(' token 29 | printf( "%s\n", str.c_str() ); | ^ a.cc:31:1: error: expected declaration befo...
s648330748
p03994
C
#include <stdio.h> #include <string.h> int main(void){ int i, j; int k; char s[100000]; int len; scanf("%100000s",s); scanf("%d", &k); len = strlen(s); for(i=0; i<len; i++){ if(k>= 124 - s[i]) s[i] = 'a'; k -= 124 - s[i]; } } print...
main.c:21:12: error: expected declaration specifiers or '...' before string constant 21 | printf("%s", s); | ^~~~ main.c:21:18: error: unknown type name 's' 21 | printf("%s", s); | ^ main.c:22:13: error: expected declaration specifiers or '...' before '\xa' 22 | ...
s604216644
p03994
C
#include<iostream> #include<string> #include<math.h> using namespace std; int main(){ string s; int a[100000]; long long int k; cin >> s; cin >> k; for (int i = 0; i < s.length(); i++){ if (s[i] == 'a'){ a[i] = 1; } else if (s[i] == 'b'){ a[i] = 2; } else if (s[i] == 'c'){ a[i] = 3; } else...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s079693999
p03994
C++
//C++14 (Clang 3.8.0) #include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #includ...
a.cc: In function 'int main()': a.cc:43:7: error: 'i' was not declared in this scope 43 | c[i]+=K; | ^
s931497201
p03994
C++
#include<stdio.h> long long int i,a,c; char b[1000100]; int main(){ gets(b); scanf("%lld",&a); for(i=0;b[i]!=NULL;i++){ if(b[i]!='\0'){ if(a>'z'-b[i]){ a=a-('z'-b[i])-1; b[i]='a'; } } } if(a>0){ a=(b[i-1]-'a'+a)%26; b[i-1]=a+'a'; } for(i=0;b[i]!=NULL;i++){ printf("%c",b[i]); } }
a.cc: In function 'int main()': a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 5 | gets(b); | ^~~~ | getw a.cc:7:23: warning: NULL used in arithmetic [-Wpointer-arith] 7 | for(i=0;b[i]!=NULL;i++){ | ^~~~ a.cc:1...
s646357204
p03994
C
#include <stdio.h> void approach_a( char* c, int* remain ) { // a...z = 97...122 int distance = 'z' + 1 - *c; if( *remain >= distance ) { *c = 'a'; *remain -= distance; } } void nextalphabet( char* c, int* remain ) { while( *remain > 0 ){ if( *c == 'z' ) {*c = 'a';} else {*c++; } ...
main.c: In function 'nextalphabet': main.c:18:25: error: expected ';' before '}' token 18 | remain-- | ^ | ; 19 | } | ~ main.c: At top level: main.c:22:1: error: return type defaults to 'int' [-Wimpli...
s795631442
p03994
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; string minimamset(string s1,string s2){ if(strcmp(s1.c_str(),s2.c_str())<0) return s1; else return s2; } string changestring(string s,int K,int nota){ //cout << "s: " << s << " K: " << K << " nota: " << nota << endl; if(no...
a.cc: In function 'std::string minimamset(std::string, std::string)': a.cc:7:8: error: 'strcmp' was not declared in this scope 7 | if(strcmp(s1.c_str(),s2.c_str())<0) return s1; | ^~~~~~ a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring...
s891770499
p03994
C++
#include<bits/stdc++.h> using namespace std; #define fs first #define sc second #define MOD 1000000007 #define pb push_back #define mp make_pair typedef int Int; typedef pair<Int,Int> pii; typedef vector<Int> vi; typedef vector<pii> vii; int main() { string S; Int K,l,lt=l-1; cin>>S; cin>>K; l=S.length(); for(In...
a.cc: In function 'int main()': a.cc:30:30: error: expected ')' before ';' token 30 | (lt=i;) | ~ ^ | ) a.cc:30:31: error: expected primary-expression before ')' token 30 | (lt=i;) | ...
s963531703
p03994
Java
public class Main { // aにできるまで最初からステップ,あとは最後のものを最後まで回す public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder str = new StringBuilder(br.readLine()); int num = Integer.valueOf(br.readLine()); br.close(); int index = ...
Main.java:5: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:5: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ ...
s243573272
p03994
C++
#include <cstring> #include <cstdlib> #include <cmath> #include <ctime> #include <cassert> #include <string> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> #include <map> #include <set> #include <time.h> using namespace std; typedef pair<int,int> P; ty...
a.cc: In function 'int main()': a.cc:48:22: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(int&, int, char&)' 48 | s.replace(i,1,c); | ~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/string:54, from a.cc:6: /usr/include/c++...
s099478748
p03994
C++
#include <iostream> #include <string> using namespace std; int ps(string &s, int &k, int i) { for (int i = 0; i < s.size(); i++) { if (s[i] == 'a') continue; if (('z' + 1) - s[i] <= k) { int diff = 'z' + 1 - s[i]; s[i] = 'a'; k -= diff; return i + 1; } } s[s.size() - 1] += k;...
a.cc: In function 'int main()': a.cc:28:15: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int' 28 | i = ps(s, K, i); | ^ a.cc:6:24: note: initializing argument 2 of 'int ps(std::string&, int&, int)' 6 | int ps(string &s, int &k, int i) { ...
s882759307
p03994
Java
import java.io.*; import java.util.NoSuchElementException; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String str=sc.next(); char ar[]=str.toCharArray(); int L=ar.length; int left=sc.nextInt(); for (int i = 0; i < L-1; i...
Main.java:23: error: cannot find symbol isa=true; ^ symbol: variable isa location: class Main 1 error
s116778812
p03994
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(i,0,n) int main() { string str; int k; cin >> str >> k; REP(i, str.size()) { if (str[i] == 'a') continue; int cnt = 'z' - str[i] + 1; if (cnt <= k) { str[i] = 'a'; k -= cnt;...
a.cc: In function 'int main()': a.cc:24:88: error: expected ';' before ')' token 24 | str[str.size() - 1] = (char)((str[str.size() - 1] - 'a') + (k % 26)) % 26 + 'a'); | ^ | ...
s137048486
p03994
C++
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <vector> #include <stack> #include <queue> #include <set> #include <bitset> #include <map> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> using namespace std; typedef long long ll; typedef pair<int,int> p...
a.cc: In function 'int main()': a.cc:35:39: error: expected primary-expression before '>' token 35 | while('z' - s[p] + 1 => nokori && p < s.size() - 1){ | ^
s157994720
p03994
C++
#include<iostream> #include<vector> #include<string> #define int long long using namespace std; signed main() { string a; int b; getline(cin, a); cin >> b; for (long long c = 0; c < a.length(); c++) { int d; if (a[c] == 'a')continue; int d = 26 - (a[c] - 'a'); if (d > b)continue; a[c] = 'a'; b -= d; ...
a.cc: In function 'int main()': a.cc:15:21: error: redeclaration of 'long long int d' 15 | int d = 26 - (a[c] - 'a'); | ^ a.cc:13:21: note: 'long long int d' previously declared here 13 | int d; | ^
s187610177
p03994
C++
#include <iostream> using namespace std; const int maxx = 100001; int main() { string s; cin>>s; long k; cin>>k; int ptr = 0; while(k>0 && ptr<s.length()) { if( s[ptr] == 'a') { ++ptr; continue; } int need = 123 - s[ptr]; if( need =< k) { k-=need; s[ptr++]='a'; continue; } ++ptr;...
a.cc: In function 'int main()': a.cc:20:27: error: expected primary-expression before '<' token 20 | if( need =< k) | ^
s057472096
p03994
C++
#include <iostream> #include <string> #include <vector> #include <cmath> #include <cstdlib> #include <cstdio> using namespace std; int min(int a,int b){return a<b?a:b;} int main(void){ char c; char str[100008]; int arr[100008]; int N = 0; int K; scanf("%s",str); N = strlen(str); f...
a.cc: In function 'int main()': a.cc:19:9: error: 'strlen' was not declared in this scope 19 | N = strlen(str); | ^~~~~~ a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <cstdio> +++ |+#include <cstring> 7 | us...
s446137473
p03994
C++
#include<iostream> #include<cmath> #include<string.h> #include<stdio.h> #include<algorithm> using namespace std; int n; char s[1000011]; int k; int main() { int i,j; scanf("%s",s); n=strlen(s); cin>>k; for(i=0;i<n;i++) { if((int)'z'-s[i]+1<=k) { k-=(int)'z'...
a.cc: In function 'int main()': a.cc:35:13: error: 'assert' was not declared in this scope 35 | assert(0); | ^~~~~~ a.cc:6:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 5 | #include<algorithm> +++ |+#include <cassert> ...
s193902758
p03994
C++
#include <iostream> #include <string> #include <vector> #include <cmath> #include <cstdlib> using namespace std; int min(int a,int b){return a<b?a:b;} int main(void){ char c; char str[100008]; int arr[100008]; int N = 0; int K; scanf("%s",str); N = strlen(str); for(int i = 0 ; i <...
a.cc: In function 'int main()': a.cc:18:9: error: 'strlen' was not declared in this scope 18 | N = strlen(str); | ^~~~~~ a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <cstdlib> +++ |+#include <cstring> 6 | u...
s979180124
p03994
C++
#include<iostream> #include<vector> #include<string> #include<math.h> #include<algorithm> using namespace std; #define USINT_MAX 4294967295 int main(){ int k; char a[1000000]; cin >> a; cin >> k; for (int i=0;k>0;i++) { if ('z' + 1 - a[i] <= k) { k -= ('z' + 1 - a[i]); a[i] = 'a'; } if (a[i] == 0) { for (i...
a.cc: In function 'int main()': a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:9:11: note: to match this '{' 9 | int main(){ | ^
s815318839
p03994
C++
#include "bits/stdc++.h" #define _CRT_SECURE_NO_WARNINGS #define rep(i,n) for(int i = 0;i < n;i++) #define REP(i,n,k) for(int i = n;i < k;i++) #define P(p) cout << (p) << endl; #define sP(p) cout << setprecision(15) << fixed << p << endl; #define Pi pair<int,int> #define IINF 1e9 #define LINF 1e18 #define vi vector<int...
a.cc: In function 'void solve()': a.cc:69:18: error: 'A' was not declared in this scope 69 | cin >> s;A | ^ a.cc:71:16: error: 'k' was not declared in this scope 71 | cin >> k; | ^
s163432983
p03994
C++
#include<iostream> #include<vector> #include<string> #define int long long using namespace std; int main() { string a; int b; cin >> a >> b; for (int c = 0;c<a.length(); c++) { int d = 26 - (a[c] - 'a'); if (d > b)continue; a[c] = 'a'; b -= d; } a[a.length() - 1] += b; cout << a << endl; }
cc1plus: error: '::main' must return 'int'
s507288412
p03994
C
char addK(char c, int k){ int i; char newC; for(i=0;i<k;i++){ if(c=='z'){ newC = 'a'; } newC = char(int(c)+1); } } int main(){ int i=0; char s[100000]; char newS[100000]; int k=0; scanf("%s",s); scanf("%d",&k); int array[num]; c = s[i]...
main.c: In function 'addK': main.c:8:20: error: expected expression before 'char' 8 | newC = char(int(c)+1); | ^~~~ main.c: In function 'main': main.c:18:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 18 | scanf("%s",s); | ...
s689698555
p03994
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1e9; string s; int n; void solve(){ int target = 0; while(n>0){ while(s[target]=='a'){ if(target==s.size()-1)break; target++; } if(('z'+1)-s[target]<=n) { n -= ('z'+1...
a.cc: In function 'void solve()': a.cc:20:21: error: no matching function for call to 'min(int, std::__cxx11::basic_string<char>::size_type)' 20 | target = min((target+1),(s.size()-1)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s592680137
p03994
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <iomanip> #include <sstream> #include <bitset> #include <fstream> #include <queue> #include <math.h> #include <set> #include <stdlib.h> #include <time.h> #include <list> #define For(i,a,b) for(int i=(a);i<(b);++i) #def...
a.cc: In function 'int main()': a.cc:47:35: error: expected ';' before '}' token 47 | continue;i | ^ | ; 48 | } | ~
s673119310
p03994
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 1e9; string s; int n; void solve(){ int target = 0; while(n>0){ while(s[target]=='a'){ if(target==s.size()-1)break; target++; } if(('z'+1)-s[target]<=n) { n -= ('z'+1...
a.cc: In function 'void solve()': a.cc:20:21: error: no matching function for call to 'min(int, std::__cxx11::basic_string<char>::size_type)' 20 | target = min((target+1),(s.size()-1)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s320766984
p03994
C++
#define len(val) static_cast<long long>(val.size()) #define rep(i, n) for(int i=0; i<(n); i++) typedef long long ll; typedef pair<int, int> P; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int K; cin >> K; for(int i=0; i<len(s); i++){ int n = s[i]-'a'; ...
a.cc:4:9: error: 'pair' does not name a type 4 | typedef pair<int, int> P; | ^~~~ a.cc: In function 'int main()': a.cc:9:5: error: 'cin' was not declared in this scope 9 | cin.tie(0); | ^~~ a.cc:10:5: error: 'ios' has not been declared 10 | ios::sync_with_stdio(false); |...
s447048156
p03994
C++
#include <iostream> #include <algorithm> #include <climits> #include <string> #include <vector> #include <cmath> using namespace std; char s[100010]; int K; char n(char c) { int i = (int)c-(int)'a'; return (char)((i+1)%26 + (int)'a'); } void rotate(int i) { s[i] = n(s[i]); } int main() { cin >> s; cin >> ...
a.cc: In function 'int main()': a.cc:24:11: error: 'strlen' was not declared in this scope 24 | int l = strlen(s); | ^~~~~~ a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <cmath> +++ |+#include <cstring> 7 | ...
s296852705
p03994
C++
#include <algorithm> #include <cstddef> #include <cstdint> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> int main() { std::string s; int k; std::cin >>...
a.cc:50:5: error: redefinition of 'int main()' 50 | int main() { | ^~~~ a.cc:16:5: note: 'int main()' previously defined here 16 | int main() { | ^~~~
s074661709
p03994
C++
(64690) 3628800 (64691) 19958400 (64692) 3628800 (64693) 39916800 (64694) 39916800 (64695) 239500800 (64696) 3628800 (64697) 39916800 (64698) 39916800 (64699) 239500800 (64700) 39916800 (64701) 479001600 (64702) 479001600 (64703) 3113510400 (64704) 40320 (64705) 362880 (64706) 362880 (64707) 1814400 (64708) 362880 (647...
a.cc:866:36: warning: multi-character character constant [-Wmultichar] 866 | a.cpp:11:2: error: expected ';' in 'for' statement specifier | ^~~~~ a.cc:869:39: warning: multi-character character constant [-Wmultichar] 869 | a.cpp:4:18: note: expanded from macro 'rep' | ...
s155593808
p03994
C++
#include <string> #include <vector> #include <map> #include <iomanip> #include <algorithm> #include <queue> #include <cmath> #include <numeric> #include <functional> #include <cstring> #include <set> using namespace std; typedef long long ll; #define MAX 1e9+7 #define rep(i,n) for(int i=0;i<n;i++) int main() { strin...
a.cc: In function 'int main()': a.cc:20:19: error: 'cin' was not declared in this scope 20 | string s; cin >> s; | ^~~ a.cc:12:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 11 | #include <set> +++ |+#include <iostr...
s193442134
p03994
C++
#include<bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<double> vd; typedef vector<vd> vvd; typedef vector<vvd> vvvd; typedef pair<int, int> pii; typedef vector<pii> vpii; #define pb push_back #define mp make_pair #define snd second #define fst first #define debug ...
a.cc: In function 'int main()': a.cc:33:46: error: expected ';' before 'cout' 33 | s[N-1] = 'a' + (s[N-1]-'a' + K%26)%26 | ^ | ; 34 | cout << s << endl; | ~~~~ ...
s677212265
p03994
C++
#include<bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<double> vd; typedef vector<vd> vvd; typedef vector<vvd> vvvd; typedef pair<int, int> pii; typedef vector<pii> vpii; #define pb push_back #define mp make_pair #define snd second #define fst first #define debug ...
a.cc:33:9: error: 's' does not name a type 33 | s[N-1] = 'a' + (s[N-1]-'a' + K%26)%26 | ^ a.cc:37:9: error: expected unqualified-id before 'return' 37 | return 0; | ^~~~~~ a.cc:38:1: error: expected declaration before '}' token 38 | } | ^
s668823486
p03994
C++
#include <bits/stdc++.h> using namespace std; string s; int main() { ios_base::sync_with_stdio(0); cin >> s; cin >> k; for (int i=0;i<n;i++) { int v='z'-s[i]+1; if (v<=k) { s[i]='a'; k-=v; } } cout << s << "\n"; return 0; } #include <bits/stdc+...
a.cc: In function 'int main()': a.cc:7:12: error: 'k' was not declared in this scope 7 | cin >> k; | ^ a.cc:8:20: error: 'n' was not declared in this scope 8 | for (int i=0;i<n;i++) { | ^ a.cc: At global scope: a.cc:20:8: error: redefinition of 'std::string s' ...
s229558550
p03994
C++
#include <bits/stdc++.h> using namespace std; string s; int main() { ios_base::sync_with_stdio(0); cin >> s; cin >> k; for (int i=0;i<n;i++) { int v='z'-s[i]+1; if (v<=k) { s[i]='a'; k-=v; } } cout << s << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:7:12: error: 'k' was not declared in this scope 7 | cin >> k; | ^ a.cc:8:20: error: 'n' was not declared in this scope 8 | for (int i=0;i<n;i++) { | ^
s508914260
p03994
C++
#include<bits/stdc++.h> #define mp make_pair #define pb push_back #define F first #define S second #define SS stringstream #define sqr(x) ((x)*(x)) #define m0(x) memset(x,0,sizeof(x)) #define m1(x) memset(x,63,sizeof(x)) #define CC(x) cout << (x) << endl #define pw(x) (1ll<<(x)) #define buli(x) __builtin_popcount...
a.cc: In function 'int main()': a.cc:37:30: error: expected primary-expression before '=' token 37 | to % = 26; | ^
s209583060
p03995
C++
考察間違えてた 解説読んだ
a.cc:1:1: error: '\U00008003\U00005bdf\U00009593\U00009055\U00003048\U00003066\U0000305f' does not name a type 1 | 考察間違えてた | ^~~~~~~~~~~~~~
s460382061
p03995
C++
#include<cstdio> #include<cstring> #include<algorithm> #define maxn 100005 #define oo 0x3f3f3f3f using namespace std; struct node { int x,y,val; }tr[maxn]; int t,n,r,c; int fa[maxn],del[maxn],mn1[maxn],mn2[maxn];//del[i]指i到父节点的差值 bool cmp(node a,node b) { if(a.y!=b.y) return a.y<b.y; else return a.x<b.x; }//以y轴为第...
a.cc: In function 'int main()': a.cc:70:17: error: continue statement not within a loop 70 | continue; | ^~~~~~~~ a.cc:75:17: error: continue statement not within a loop 75 | continue; | ^~~~~~~~ a.cc:89:17: error: continue statement not ...
s330248553
p03995
C++
#include<cstdio> #include<cstdlib> #include<iostream> #include<vector> #include<queue> #include<bitset> #include<string> #include<stack> #include<set> #include<unordered_set> #include<map> #include<unordered_map> #include<cstring> #include<complex> #include<cmath> #include<iomanip> #include<numeric> #include<algorithm>...
a.cc: In function 'int main()': a.cc:102:17: error: 'chk' was not declared in this scope 102 | chk[x[i]]=chk[n+y[i]]=1; | ^~~
s294352030
p03995
C++
2 2 3 1 1 0 1 2 10 2 1 20
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 2 | ^
s978194379
p03995
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)n;i++) #define all(c) (c).begin(),(c).end() #define pb push_back #define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0); using namespace std; namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(cons...
a.cc: In member function 'int uf::root(int)': a.cc:29:34: error: 'n' was not declared in this scope; did you mean 'yn'? 29 | if(x < 0 || x >= n) exit(0); //????? | ^ | yn a.cc: In member function 'bool uf::merge(int, int, l...
s208533942
p03995
C++
#include <bits/stdc++.h> using namespace std; class disjoint_set { public: vector<long long> rank, prt, ptl; disjoint_set (long long size) { rank.resize(size); prt.resize(size); ptl.resize(size); for (long long i = 0; i < size; i++) { prt[i] = i; rank[i] = 0; ptl[i] = 0; } ...
a.cc: In function 'int main()': a.cc:75:22: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int' 75 | long long& a = p.second; | ~~^~~~~~ a.cc:100:23: error: no matching function for call to 'min(int&, long long int)' 100 | mina = ...
s497665349
p03995
C++
#include <iostream> #include<vector> #include<algorithm> #include<map> using namespace std; int main() { int r,c,n;cin>>r>>c>>n; map<int,map<int,int>> m; vector<int> a(n); vector<pair<int,int>> xy(n),yx(n); vector<vector<pair<int,int>>> ya(r),xa(c); for(int i=0;i<n;i++){ cin>>xy[i].first>>xy[i].second>>a[i]; ...
a.cc: In function 'int main()': a.cc:41:67: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 41 | map<int,int>::iterator itr=md.find[ya[tempx][k].first]; | ^
s609826711
p03995
C++
#include <iostream> #include<vector> #include<algorithm> #include<map> using namespace std; int main() { int r,c,n;cin>>r>>c>>n; map<int,map<int,int>> m; vector<int> a(n); vector<pair<int,int>> xy(n),yx(n); vector<vector<pair<int,int>>> ya(r),xa(c); for(int i=0;i<n;i++){ cin>>xy[i].first>>xy[i].second>>a[i]; ...
a.cc: In function 'int main()': a.cc:41:49: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 41 | auto itr=md.find[ya[tempx][k].first]; | ^
s695904998
p03995
C++
#include<bits/stdc++.h> #define maxn 500005 #define inf -10000000 using namespace std; inline int read() { char x = getchar(); int lin = 0, f = 1; while(x < '0' || x > '9') { if(x == '-') f = -1; x = getchar(); } while(x >= '0' && x <= '9') { lin = lin * 10 + x - '0'; x = getchar(); } return lin * f...
a.cc: In function 'int main()': a.cc:75:14: error: expected ';' before 'while' 75 | t = 1 | ^ | ; 76 | while(t--) | ~~~~~
s158493124
p03995
C++
//shu wen tong%%%%%%%%% #include<bits/stdc++.h> using namespace std; struct node{ int x,y; }a[100001]; queue<node> q; bool vis[501][501],ok; int value[501][501]; int T,R,C,n,xi,yi,data; int main(){ scanf("%d%d%d",&R,&C,&n);ok=true; memset(vis,0,sizeof(vis)); memset(value,0,sizeof(value)); while(!q.empty()) q.p...
a.cc: In function 'int main()': a.cc:17:49: error: reference to 'data' is ambiguous 17 | scanf("%d%d%d",&xi,&yi,&data); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, ...
s661670355
p03995
C++
#include <bits/stdc++.h> # define LocalJudge( File ) freopen ( File ".in", "r", stdin ) ; using namespace std ; inline void smin ( int& d, int x ) { ( d > x ) ? d = x : 0 ; } const long long inf = ( ~0ull >> 1 ) ; const int N = 500010 ; long long a [N] ; int q [N] ; bool inq [N] ; vector < pair < int, int > > ...
a.cc: In function 'int main()': a.cc:59:40: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int' 59 | smin ( m1, a [q [j]] ) ; | ^~ a.cc:7:25: note: initializing argument 1 of 'void smin(int&, in...
s337809101
p03995
C++
#include <cstdio> #include <map> #include <set> using namespace std; typedef pair<int,int> P; typedef pair<P,int> PP; int comp(const PP& a, const PP& b) { return a.first < b.first; } int R,C; int N; PP rc[100010]; map<int,int> rConstraints; map<int,int> cConstraints; int main() { scanf("%d%d%d", &R, &C, &N); ...
a.cc: In function 'int main()': a.cc:30:3: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | sort(rc, rc+N, comp); | ^~~~ | short a.cc:35:26: error: no matching function for call to 'lower_bound(PP [100010], PP*, PP, int (&)(const PP&, const PP&))' 35 | PP found=*lower...
s066634211
p03995
C++
#include <cstdio> #include <map> #include <set> using namespace std; typedef pair<int,int> P; typedef pair<P,int> PP; int comp(const PP& a, const PP& b) { return a.first < b.first; } int R,C; int N; PP rc[100010]; map<int,int> rConstraints; map<int,int> cConstraints; int main() { scanf("%d%d%d", &R, &C, &N); ...
a.cc: In function 'int main()': a.cc:30:3: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | sort(rc, rc+N, comp); | ^~~~ | short a.cc:35:26: error: no matching function for call to 'lower_bound(PP [100010], PP*, PP, int (&)(const PP&, const PP&))' 35 | PP found=*lower...
s658758432
p03995
C++
#include <bits/stdc++.h> using namespace std; const int INF = 1145141919; using P = pair<int, int>; int main() { cin.tie(0); ios::sync_with_stdio(false); int R, C, N; cin >> R >> C >> N; map<P, int> memo; priority_queue<P, vector<P>, greater<P> > q; for (int i = 0; i < N; i++) { int r, c, a; cin >> r >> ...
a.cc: In function 'int main()': a.cc:28:27: error: 'class std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >' has no member named 'front' 28 | P pos = q.front(); | ^~~~~
s715016252
p03995
C++
#pragma region include #include <iostream> #include <iomanip> #include <stdio.h> #include <sstream> #include <algorithm> #include <cmath> #include <complex> #include <string> #include <cstring> #include <vector> #include <tuple> #include <bitset> #include <queue> #include <complex> #include <set> #include <map> #inc...
a.cc:54:17: error: 'edge_base' was not declared in this scope 54 | vector< vector< edge_base > > gra; | ^~~~~~~~~ a.cc:54:27: error: template argument 1 is invalid 54 | vector< vector< edge_base > > gra; | ^ a.cc:54:27: error: template argument 2 is invalid a....
s660389270
p03995
C++
#include <cstdio> #include <cmath> #include <algorithm> #include <utility> typedef long long signed int LL; typedef long long unsigned int LU; #define incID(i, l, r) for(int i = (l) ; i < (r); i++) #define incII(i, l, r) for(int i = (l) ; i <= (r); i++) #define decID(i, l, r) for(int i = (r) - 1; i >= (l); ...
a.cc:35:6: error: 'vector' in namespace 'std' does not name a template type 35 | std::vector< std::pair<int, int> > vec[100000]; | ^~~~~~ a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 5 | #include <utility> +++ |+#include <vecto...
s225584886
p03995
C++
#include <cstdio> #include <cmath> #include <algorithm> #include <utility> typedef long long signed int LL; typedef long long unsigned int LU; #define incID(i, l, r) for(int i = (l) ; i < (r); i++) #define incII(i, l, r) for(int i = (l) ; i <= (r); i++) #define decID(i, l, r) for(int i = (r) - 1; i >= (l); ...
a.cc:35:6: error: 'vector' in namespace 'std' does not name a template type 35 | std::vector< std::pair<int, int> > vec[100000]; | ^~~~~~ a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 5 | #include <utility> +++ |+#include <vecto...
s220060633
p03995
C++
#include<iostream> #include<vector> using namespace std; int main(void){ int R; int C; int N; string res = "Yes"; // input cin >> R; cin >> C; cin >> N; vector<int> rr(N); vector<int> cc(N); vector<int> aa(N); for (int i=1; i<=N; i++) { cin >> rr[i-1]; ...
a.cc: In function 'int main()': a.cc:42:17: error: 'r' was not declared in this scope 42 | r = rr[i-1]; | ^ a.cc:43:17: error: 'c' was not declared in this scope 43 | c = cc[i-1]; | ^ a.cc:44:17: error: 'a' was not declared in this scope ...
s724705623
p03995
C++
#include<iostream> #include<vector> using namespace std; int main(void){ int R; int C; int N; string res = "Yes"; // input cin >> R; cin >> C; cin >> N; for (int i=1; i<=N; i++) { cin >> r[i-1]; cin >> c[i-1]; cin >> a[i-1]; } //initialize ...
a.cc: In function 'int main()': a.cc:16:16: error: 'r' was not declared in this scope 16 | cin >> r[i-1]; | ^ a.cc:17:16: error: 'c' was not declared in this scope 17 | cin >> c[i-1]; | ^ a.cc:18:16: error: 'a' was not declared in this scope 18 | ...
s659822440
p03995
C++
#include<iostream> #include<vector> using namespace std; int main(void){ int R; int C; int N; string res = "Yes"; // input cin >> R; cin >> C; cin >> N; for (i=1; i<=N; i++) { cin >> r[i-1]; cin >> c[i-1]; cin >> a[i-1]; } //initialize ...
a.cc: In function 'int main()': a.cc:15:10: error: 'i' was not declared in this scope 15 | for (i=1; i<=N; i++) { | ^ a.cc:16:16: error: 'r' was not declared in this scope 16 | cin >> r[i-1]; | ^ a.cc:17:16: error: 'c' was not declared in this scope 17 | ...
s646454359
p03995
C++
#include<iostream> using namespace std; int main(void){ int R; int C; int N; string res = "Yes"; // input cin >> R; cin >> C; cin >> N; for (i=1; i<=N; i++) { cin >> r[i-1]; cin >> c[i-1]; cin >> a[i-1]; } //initialize vector<int> rr(N)...
a.cc: In function 'int main()': a.cc:14:10: error: 'i' was not declared in this scope 14 | for (i=1; i<=N; i++) { | ^ a.cc:15:16: error: 'r' was not declared in this scope 15 | cin >> r[i-1]; | ^ a.cc:16:16: error: 'c' was not declared in this scope 16 | ...
s181646258
p03995
Java
import java.util.*; import com.sun.scenario.effect.Effect; public class Main { static final int INF = Integer.MAX_VALUE; // 2147483647 static final long LINF = Long.MAX_VALUE; // 9223372036854775807 static int DEBUG = 0; public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new ...
Main.java:4: error: package com.sun.scenario.effect does not exist import com.sun.scenario.effect.Effect; ^ 1 error
s600543343
p03995
Java
// package atcoder.other2016.codefestival2016.quala; import com.sun.rowset.internal.Row; import jdk.internal.util.xml.impl.Pair; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Arrays; import java.util.Inp...
Main.java:3: error: package com.sun.rowset.internal is not visible import com.sun.rowset.internal.Row; ^ (package com.sun.rowset.internal is declared in module java.sql.rowset, which does not export it) Main.java:4: error: package jdk.internal.util.xml.impl is not visible import jdk.internal.util...
s877621763
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>&, vector<bool> &); vector<pair<int, long long>> g[1234567]; long long node[1234567] = {0}; int R, C; long long minR, minC = 1000000000; int main(){ cin >> R >> C; int N; cin >> N;...
a.cc: In function 'bool DFSUtil(int, std::vector<bool>&, std::vector<bool>&)': a.cc:48:15: error: expected primary-expression before ')' token 48 | if(was[w])){ | ^
s240649209
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>&, vector<bool> &); vector<pair<int, long long>> g[1234567]; long long node[1234567] = {0}; int R, C; long long minR, minC = 1000000000; int main(){ cin >> R >> C; int N; cin >> N;...
a.cc: In function 'bool DFSUtil(int, std::vector<bool>&, std::vector<bool>&)': a.cc:54:18: error: too few arguments to function 'bool DFSUtil(int, std::vector<bool>&, std::vector<bool>&)' 54 | if(!DFSUtil(w, visited)) return false; | ~~~~~~~^~~~~~~~~~~~ a.cc:38:6: note: declared here 38 | bo...
s573481981
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>&, vector<bool> &); vector<pair<int, long long>> g[1234567]; long long node[1234567] = {0}; int R, C; long long minR, minC = 1000000000; int main(){ cin >> R >> C; int N; cin >> N;...
a.cc: In function 'int main()': a.cc:30:14: error: too few arguments to function 'bool DFSUtil(int, std::vector<bool>&, std::vector<bool>&)' 30 | if(!DFSUtil(0, visited)){ | ~~~~~~~^~~~~~~~~~~~ a.cc:8:6: note: declared here 8 | bool DFSUtil(int, vector<bool>&, vector<bool> &); | ^~~~~~~ ...
s483709994
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>&, vector<bool> &); vector<pair<int, int>> g[1234567]; long long node[1234567] = {0}; int R, C; long long minR, minC = 1000000000; int main(){ cin >> R >> C; int N; cin >> N; f...
a.cc: In function 'int main()': a.cc:29:14: error: too few arguments to function 'bool DFSUtil(int, std::vector<bool>&, std::vector<bool>&)' 29 | if(!DFSUtil(0, visited)){ | ~~~~~~~^~~~~~~~~~~~ a.cc:8:6: note: declared here 8 | bool DFSUtil(int, vector<bool>&, vector<bool> &); | ^~~~~~~
s480380963
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); vector<pair<int, int>> g[1234567]; int node[1234567]; int R, C; int main(){ cin >> R >> C; int N; cin >> N; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a...
a.cc: In function 'bool DFSUtil(int, std::vector<bool>)': a.cc:45:15: error: 'minR' was not declared in this scope 45 | if(v < R) minR = minR >node[v] ? node[v] : minR; | ^~~~ a.cc:46:16: error: 'minC' was not declared in this scope 46 | if(v >= R) minC = minC>node[v] ? node[v] : minC;...
s224876733
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); vector<pair<int, int>> g[1234567]; int node[1234567]; int main(){ int R, C; cin >> R >> C; int N; cin >> N; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >>...
a.cc: In function 'bool DFSUtil(int, std::vector<bool>)': a.cc:45:12: error: 'R' was not declared in this scope 45 | if(v < R) minR = minR >node[v] ? node[v] : minR; | ^ a.cc:45:15: error: 'minR' was not declared in this scope 45 | if(v < R) minR = minR >node[v] ? node[v] : minR; | ...
s294152863
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); vector<pair<int, int>> g[1234567]; int Node[1234567]; int main(){ int R, C; cin >> R >> C; int N; cin >> N; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >>...
a.cc: In function 'bool DFSUtil(int, std::vector<bool>)': a.cc:40:22: error: 'node' was not declared in this scope; did you mean 'Node'? 40 | if(visited[w] && node[v] + node[w] != a){ | ^~~~ | Node a.cc:43:5: error: 'node' was not declared in this scope; did ...
s639932560
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); vector<pair<int, int>> g[1234567]; int main(){ int R, C; cin >> R >> C; int N; cin >> N; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a; g[r].push_ba...
a.cc: In function 'bool DFSUtil(int, std::vector<bool>)': a.cc:39:22: error: 'node' was not declared in this scope 39 | if(visited[w] && node[v] + node[w] != a){ | ^~~~ a.cc:42:5: error: 'node' was not declared in this scope 42 | node[w] = a - node[v]; | ^~~~ a.cc:44:1...
s896907153
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>, const vector<pair<int,int>>&[]); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<pair<int, int>> g[C + R]; for(int i = 0; i < N; i++){ int r, c, a; ci...
a.cc:8:62: error: creating array of references 8 | bool DFSUtil(int, vector<bool>, const vector<pair<int,int>>&[]); | ^ a.cc:35:72: error: declaration of 'g' as array of references 35 | bool DFSUtil(int v, vector<bool> visited, const vector<pair<...
s981740418
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>, const vector<pair<int,int>>&); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<pair<int, int>> g[C + R]; for(int i = 0; i < N; i++){ int r, c, a; cin ...
a.cc: In function 'int main()': a.cc:27:27: error: invalid initialization of reference of type 'const std::vector<std::pair<int, int> >&' from expression of type 'std::vector<std::pair<int, int> > [(C + R)]' 27 | if(!DFSUtil(0, visited, g)){ | ^ a.cc:8:33: note: in passing argument ...
s164528967
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>, vector<pair<int,int>>&); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<pair<int, int>> g[C + R]; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >...
a.cc: In function 'int main()': a.cc:27:27: error: invalid initialization of reference of type 'std::vector<std::pair<int, int> >&' from expression of type 'std::vector<std::pair<int, int> > [(C + R)]' 27 | if(!DFSUtil(0, visited, g)){ | ^ a.cc:8:33: note: in passing argument 3 of '...
s063880002
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<pair<int, int>> g[C + R]; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a; g[r].push_...
a.cc: In function 'int main()': a.cc:27:14: error: too many arguments to function 'bool DFSUtil(int, std::vector<bool>)' 27 | if(!DFSUtil(0, visited, g)){ | ~~~~~~~^~~~~~~~~~~~~~~ a.cc:8:6: note: declared here 8 | bool DFSUtil(int, vector<bool>); | ^~~~~~~ a.cc: In function 'bool DFSUtil...
s172345908
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<pair<int, int>> g[C + R]; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a; g[r].push_...
a.cc: In function 'bool DFSUtil(int, std::vector<bool>)': a.cc:37:22: error: 'g' was not declared in this scope 37 | for(int i = 0; i < g[v].size(); i++){ | ^ a.cc:40:22: error: 'node' was not declared in this scope 40 | if(visited[w] && node[v] + node[w] != a){ | ...
s476740983
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<pair<int, int>> g[C + R]; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a; g[r].push_...
a.cc: In function 'int main()': a.cc:20:40: error: expected ')' before ';' token 20 | g[r].push_back(make_pair( c + C, a); | ~ ^ | ) a.cc:31:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::ba...
s976222279
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<pair<int, int>> g; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a; g[r].push_back(ma...
a.cc: In function 'int main()': a.cc:20:10: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'push_back' 20 | g[r].push_back(make_pair( c + C, a); | ^~~~~~~~~ a.cc:20:40: error: expecte...
s718559417
p03995
C++
#include <iostream> #include <math.h> #include <vector> #include <utility> using namespace std; bool DFSUtil(int, vector<bool>); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<int, pair<int, int>> g; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a; g[r].push_ba...
In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<int, std::pair<int, int> >': /usr/include/c++/14/bits/stl_vector.h:428:11: required from 'class std::vector<int, std::pair<int, int> >' 428 | cl...
s746120097
p03995
C++
#include <iostream> #include <math.h> #include <vector> using namespace std; bool DFSUtil(int, vector<bool>); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<int, pair<int, int>> g; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a; g[r].push_back(make_pair( c + C,...
In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<int, std::pair<int, int> >': /usr/include/c++/14/bits/stl_vector.h:428:11: required from 'class std::vector<int, std::pair<int, int> >' 428 | cl...
s321707007
p03995
C++
#include <iostream> #include <math.h> bool DFSUtil(int, vector<bool>); int main(){ int R, C; cin >> R >> C; int N; cin >> N; vector<int, pair<int, int>> g; for(int i = 0; i < N; i++){ int r, c, a; cin >> r >> c >> a; g[r].push_back(make_pair( c + C, a); g[c + C].push_back(make_pair(r, a...
a.cc:4:19: error: 'vector' has not been declared 4 | bool DFSUtil(int, vector<bool>); | ^~~~~~ a.cc:4:25: error: expected ',' or '...' before '<' token 4 | bool DFSUtil(int, vector<bool>); | ^ a.cc: In function 'int main()': a.cc:8:3: error: 'cin' was not de...
s143235179
p03995
C++
#include <cstdio> #include <cmath> #include <cstring> #include <ctime> #include <climits> #include <iostream> #include <algorithm> #include <set> #include <map> #include <queue> #include <vector> #include <sstream> #include <typeinfo> #include <fstream> #define ll long long using namespace std; const ll INF = LLONG_...
a.cc: In function 'int main()': a.cc:68:33: error: return-statement with no value, in function returning 'int' [-fpermissive] 68 | return; | ^~~~~~
s326881251
p03995
C++
#include <cstdio> #include <cmath> #include <cstring> #include <ctime> #include <climits> #include <iostream> #include <algorithm> #include <set> #include <map> #include <queue> #include <vector> #include <sstream> #include <typeinfo> #include <fstream> #define DIV 1000000007 const ll INF = LLONG_MAX / 2 - 1; using n...
a.cc:17:7: error: 'll' does not name a type 17 | const ll INF = LLONG_MAX / 2 - 1; | ^~ a.cc: In function 'bool dfs(int)': a.cc:33:31: error: 'INF' was not declared in this scope 33 | if(w[next] == INF){ | ^~~ a.cc: In function 'int main()': a.cc:57:...