submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s037307235
p03854
C++
#include <algorithm> #include <array> #include <bitset> #include <functional> #include <iostream> #include <memory> #include <set> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; bool ok = true; for (int i = s.length() - 1; i >= 0; i--) { switch (s[i]) { case 'm': // ...
a.cc: In function 'int main()': a.cc:20:39: error: 'strncmp' was not declared in this scope 20 | if (i >= 4 && strncmp(&s[i - 4], "dream", 5) == 0) { | ^~~~~~~ a.cc:8:1: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by a...
s396953570
p03854
C++
#include <stdio.h> #include <string> using namespace std; int main() { char S[100001]; scanf("%s", S); int end = (int)strlen(S); end--; // zero origin bool match = false; while (true) { if (end == -1) { match = true; break; } char c = S[end]; ...
a.cc: In function 'int main()': a.cc:10:20: error: 'strlen' was not declared in this scope 10 | int end = (int)strlen(S); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <string> +++ |+#include...
s167484635
p03854
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ string devide[4] = {"dream", "dreamer", "erase", "eraser"}; string S; cin >> S; reverse(S.begin(), S.end()); for(int i=0; i<4; ++i) reverese(devide[i].begin(), devide[i].end()); bool flag = true; for(int i=0; i<S.size()...
a.cc: In function 'int main()': a.cc:11:32: error: 'reverese' was not declared in this scope 11 | for(int i=0; i<4; ++i) reverese(devide[i].begin(), devide[i].end()); | ^~~~~~~~ a.cc:18:25: error: expected ',' or ';' before 'if' 18 | if(S.substr...
s661705717
p03854
C++
#include <iostream> #include <string> #include <algorithm> int main(){ string devide[4] = {"dream", "dreamer", "erase", "eraser"}; string S; cin >> S; reverse(S.begin(), S.end()); for(int i=0; i<4; ++i) reverese(devide[i].begin(), devide[i].end()); bool flag = true; for(int i=0; i<S.size();){ bool flag2 = fa...
a.cc: In function 'int main()': a.cc:6:9: error: 'string' was not declared in this scope 6 | string devide[4] = {"dream", "dreamer", "erase", "eraser"}; | ^~~~~~ a.cc:6:9: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/...
s878964839
p03854
C++
import strutils import sequtils import algorithm import unicode var s = readLine(stdin) var str = @["dream","dreamer","erase","erase"] s = s.reversed str = str.map(reversed) while s != "": var update = false for now in str: if s.len < now.len: continue elif s.substr(0,now.len - 1)...
a.cc:7:11: error: stray '@' in program 7 | var str = @["dream","dreamer","erase","erase"] | ^ a.cc:1:1: error: 'import' does not name a type 1 | import strutils | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s708131781
p03854
Java
import java.util.Scanner; public class Daydream { public static void main(String[] args) { String divide[] = { "dream", "dreamer", "erase", "eraser" }; Scanner sc = new Scanner(System.in); String s = sc.next(); //すべての文字列を左右反転 StringBuffer sb = new StringBuffer(s); s = sb.reverse().toString(); // System...
Main.java:3: error: class Daydream is public, should be declared in a file named Daydream.java public class Daydream { ^ 1 error
s068889695
p03854
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string divide[4] = {"dream","dreamer","erase","eraser"} string s; cin >> s; revers(s.begin(),s.end()); for(int i = 0; i <= 4; i++) revers(divide(i).begin(),divide(i).end()); bool can = true; fo...
a.cc: In function 'int main()': a.cc:11:5: error: expected ',' or ';' before 'string' 11 | string s; | ^~~~~~ a.cc:12:12: error: 's' was not declared in this scope 12 | cin >> s; | ^ a.cc:14:5: error: 'revers' was not declared in this scope 14 | revers(s.begin(),s.end());...
s545606533
p03854
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ divide = {"dream","dreamer","erase","eraser"} string s; cin >> s; revers(s.begin(),s.end()); for(int i = 0; i <= 4; i++) revers(divide(i).begin(),divide(i).end()); bool can = true; for(int i = ...
a.cc: In function 'int main()': a.cc:9:5: error: 'divide' was not declared in this scope 9 | divide = {"dream","dreamer","erase","eraser"} | ^~~~~~ a.cc:12:12: error: 's' was not declared in this scope 12 | cin >> s; | ^ a.cc:14:5: error: 'revers' was not declared in this scope...
s633715701
p03854
C
#include <stdio.h> #include <string.h> int main() { int i; char s[100010]; scanf("%s", s); i = strlen(s) - 1; for (i >= 0) { if (s[i - 4] == 'd' && s[i - 3] == 'r' && s[i - 2] == 'e' && s[i - 1] == 'a' && s[i] == 'm') { i -= 5; } if (s[i - 6] == 'd' && s[i - 5] == 'r' && s[i - 4] == 'e' && s[i -3] == 'a'...
main.c: In function 'main': main.c:8:20: error: expected ';' before ')' token 8 | for (i >= 0) | ^ | ; main.c:8:20: error: expected expression before ')' token
s449679666
p03854
C
#include <stdio.h> #include <string.h> int main() { int len; char s[100010]; scanf("%s", s); i = strlen(s) - 1; for (i >= 0) { if (s[i - 4] == 'd' && s[i - 3] == 'r' && s[i - 2] == 'e' && s[i - 1] == 'a' && s[i] == 'm') { i -= 5; } if (s[i - 6] == 'd' && s[i - 5] == 'r' && s[i - 4] == 'e' && s[i -3] == '...
main.c: In function 'main': main.c:7:9: error: 'i' undeclared (first use in this function) 7 | i = strlen(s) - 1; | ^ main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in main.c:8:20: error: expected ';' before ')' token 8 | for (i >= 0...
s524661028
p03854
C++
def main(): S = input() s = len(S) while s > 4: e = s for i in (5, 6, 7): s = e - i if S[s:e] in ('dream', 'dreamer', 'erase', 'eraser'): break else: print('NO') return print('YES') main()
a.cc:9:27: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 9 | if S[s:e] in ('dream', 'dreamer', 'erase', 'eraser'): | ^~~~~~~ a.cc:9:36: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 9 | ...
s278127734
p03854
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; string s; string divide[4] = { "dream", "dreamer", "erase", "eraser" }; int main() { cin >> s; reverse(s.begin(), s.end()); for (int i = 0; i < 4; ++i) reverse(divide[i].begin(), divide[i].end()); bool flag = true; f...
a.cc: In function 'int main()': a.cc:20:48: error: expected ';' before ')' token 20 | i += str.size()); | ^ | ;
s170820289
p03854
C++
//#include <bits/stdc++.h> #include<iostream> #include<string> #include<queue> #include<vector> #define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ #define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ using namespace std; typedef long long ll;//int64 typedef unsigned long long ull; int main(){ string s; cin...
a.cc: In function 'int main()': a.cc:23:9: error: 's7' was not declared in this scope; did you mean 's6'? 23 | s7=s.substr(s.size()-7,7); | ^~ | s6
s033473480
p03854
C++
//#include <bits/stdc++.h> #include<iostream> #include<string> #include<queue> #include<vector> #define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ #define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ using namespace std; typedef long long ll;//int64 typedef unsigned long long ull; int main(){ string s; cin...
a.cc: In function 'int main()': a.cc:23:9: error: 's7' was not declared in this scope; did you mean 's6'? 23 | s7=s.substr(s.size()-7,7; | ^~ | s6 a.cc:23:33: error: expected ')' before ';' token 23 | s7=s.substr(s.size()-7,7; | ~ ^ ...
s194898033
p03854
C++
//#include <bits/stdc++.h> #include<iostream> #include<string> #include<queue> #include<vector> #define FOR(i,a,b) for(int i=(a);i<(b);i++)//初期値a,i<bの範囲でループ #define REP(i,n) FOR(i,0,n)//初期値0,i<nの範囲でループ using namespace std; typedef long long ll;//int64 typedef unsigned long long ull; int main(){ string s; cin...
a.cc: In function 'int main()': a.cc:23:9: error: 's7' was not declared in this scope; did you mean 's6'? 23 | s7=s.substr(s.size()-7,7; | ^~ | s6 a.cc:23:33: error: expected ')' before ';' token 23 | s7=s.substr(s.size()-7,7; | ~ ^ ...
s303910489
p03854
C++
#include <algorithm> #include <cctype> #include <complex> #include <iomanip> #include <iostream> #include <queue> #include <regex> #include <set> #include <string> #include <vector> #include <cstring> using std::cin; using std::cout; using std::endl; using std::string; using std::to_string; using std::vector; using s...
a.cc: In function 'int main()': a.cc:55:14: error: 'ans' was not declared in this scope; did you mean 'abs'? 55 | cout << (ans ? "YES" : "NO") << endl; | ^~~ | abs
s780329900
p03854
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; reverse(s.begin(), s.end()); for (int i = 0; i < s.size(); i++) { if (s.substr(0, 7) == "remaerd") s = s.substr(7, s.size() - 7); else if (s.substr(0, 6) == "resare") s = s.substr(6, s.size() - 6); else if (s.subst...
a.cc: In function 'int main()': a.cc:11:9: error: 'reverse' was not declared in this scope 11 | reverse(s.begin(), s.end()); | ^~~~~~~
s460707847
p03854
C++
#include <iostream> #include<sstream> #include<vector> #include<iterator> using namespace std; int main(void) { string S; cin >> S; string str(S); reverse(str.begin(), str.end()); string operation[4] = {"dreamer", "dream", "eraser", "erase"}; for(int i=0; i<4; i++) reverse(operation[i].begin(), operation[i].e...
a.cc: In function 'int main()': a.cc:13:9: error: 'reverse' was not declared in this scope 13 | reverse(str.begin(), str.end()); | ^~~~~~~
s502528122
p03854
C++
#include <bits/stdc++.h> char str[110000]; std::regex pattern ("(erase|eraser|dream|dreamer)*"); int main () { gets (str); if (std::regex_match (str, pattern)) puts ("YES"); else puts ("NO"); }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets (str); | ^~~~ | getw
s944551412
p03854
C++
#include <bits/stdc++.h> char str[110000]; std::regex pattern ("(erase|eraser|dream|dreamer)*"); int main () { gets (str); if (std::regex_match (str, pattern)) puts ("YES"); else puts ("NO"); }
a.cc: In function 'int main()': a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 7 | gets (str); | ^~~~ | getw
s274742801
p03854
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); String inverse = ""; for(int i = S.length() - 1; i >= 0; i--) { inverse += String.valueOf(S.charAt(i)); } String s1 = "maerd"; String s2 = "rem...
Main.java:31: error: variable str5 might not have been initialized if((pos + 5 <= S.length()) && (s1.equals(str5))) { ^ Main.java:33: error: variable str7 might not have been initialized } else if((pos + 7 <= S.length()) && (s2.equals(str7))) { ...
s998970310
p03854
C
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); String inverse = ""; int l=S.length(); for(int i = l - 1; i >= 0; i--) { inverse += String.valueOf(S.charAt(i)); } String s1 = "maerd"; St...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:3:1: error: unknown type name 'public' 3 | public class Main { | ^~~~~~ main.c:...
s903376599
p03854
Java
public class Main { public static void main(String[] args) throws IOException { BufferedReader input =new BufferedReader (new InputStreamReader (System.in)); String str = input.readLine( ); while(str.length() != 0){ if(str.matches("^(dreamer)+.*") && !str.startsWith("dreamerase")){ while(str.matches("^(...
Main.java:3: error: cannot find symbol public static void main(String[] args) throws IOException { ^ symbol: class IOException location: class Main Main.java:4: error: cannot find symbol BufferedReader input =new BufferedReader (new InputStreamReader (System.in));...
s805444609
p03854
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); int len = S.length(); String ans = "NO"; if(len >= 5) { // dp[i]はインデックスi~末尾までの部分文字列に対する判定結果を返す(出来るなら1、出来ないなら-1) int[] dp = new int[len]; dp...
Main.java:27: error: variable str7 might not have been initialized if((i + 7 <= len) && str7.equals("dreamer") && dp[i + 7] == 1) dp[i] = 1; ^ 1 error
s969559777
p03854
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); int len = S.length(); String ans = "NO"; if(len >= 5) { // dp[i]はインデックスi~末尾までの部分文字列に対する判定結果を返す(出来るなら1、出来ないなら-1) int[] dp = new int[len]; dp...
Main.java:23: error: variable declaration not allowed here if((i + 7) <= len) String str7 = S.substring(i, i + 7); ^ 1 error
s285387529
p03854
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); int len = S.length(); String ans = "NO"; if(len >= 5) { // dp[i]はインデックスi~末尾までの部分文字列に対する判定結果を返す(出来るなら1、出来ないなら-1) int[] dp = new int[len]; dp...
Main.java:23: error: variable declaration not allowed here if(i + 7 <= len) String str7 = S.substring(i, i + 7); ^ 1 error
s365071703
p03854
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); int len = S.length(); String ans = "NO"; if(len >= 5) { // dp[i]はインデックスi~末尾までの部分文字列に対する判定結果を返す(出来るなら1、出来ないなら-1) int[] dp = new int[len]; dp...
Main.java:17: error: cannot find symbol String str = S.substring(i - 5); ^ symbol: variable i location: class Main 1 error
s865233179
p03854
Java
import java.util.Scanner;   public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String s = sc.next(); int e = s.length(); while(true) { if (e==0) { break; } else if (e<5) { System.out.println("NO"); return; }   if (s.substring(...
Main.java:2: error: illegal character: '\u00a0' ? ^ Main.java:15: error: illegal character: '\u00a0' ? ^ Main.java:29: error: illegal character: '\u00a0' ? ^ 3 errors
s157888315
p03854
Java
import java.util.Scanner;   public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String s = sc.next(); int e = s.length(); while(true) { if (e==0) { break; } else if (e<5) { System.out.println("NO"); return; }   if (s.substring(...
Main.java:2: error: illegal character: '\u00a0' ? ^ Main.java:15: error: illegal character: '\u00a0' ? ^ Main.java:29: error: illegal character: '\u00a0' ? ^ 3 errors
s755965412
p03854
C++
s=gets.chop k=s.size while k>0 if s[k-5, 5]=='dream' or s[k-5, 5]=='erase' k-=5 elsif s[k-6, 6]=='eraser' k-=6 elsif s[k-7, 7]=='dreamer' k-=7 else break end end puts (k>0 ? "NO" : "YES")
a.cc:4:19: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 4 | if s[k-5, 5]=='dream' or s[k-5, 5]=='erase' | ^~~~~~~ a.cc:4:41: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 4 | if s[k-5, 5]=='dream' or s[k-5, 5]...
s830832704
p03854
C++
#include <iostream> #include <string> using namespace std; int main() { string str; int flag=1; cin >> str; string dream = "maerd"; string dreamer = "remaerd"; string erase = "esare"; string eraser = "resare"; reverse(begin(str),end(str)); while(flag!=0) { flag = 0; if(dream==str.substr(0,5)) { str...
a.cc: In function 'int main()': a.cc:15:9: error: 'reverse' was not declared in this scope 15 | reverse(begin(str),end(str)); | ^~~~~~~
s511312718
p03854
C
#include <stdio.h> #include <string.h> char *tbl[] = {"dreamer", "eraser", "dream", "erase"}; int len[] {6, 6, 5, 5}; char str[100001]; int main() { scanf("%s", str); while(*str != '\0') { for(pos = 0; pos < 4; pos++) { if(strncmp(tbl[pos], str, len[pos])) == 0) { break; } } if(pos == 4) { prin...
main.c:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 5 | int len[] {6, 6, 5, 5}; | ^ main.c: In function 'main': main.c:13:21: error: 'pos' undeclared (first use in this function) 13 | for(pos = 0; pos < 4; pos++) { | ^~~ ...
s262291184
p03854
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; bool isok=true; const string st[4]={"dream","dreamer","erase","eraser"}; for(int i=s.size()-1;i>=0;i++){ if(s[i]=='r'){ if(i-2>=0){ if(s[i-2]=='m' && i-6>=0){ for(int ...
a.cc: In function 'int main()': a.cc:21:37: error: lvalue required as left operand of assignment 21 | else if(s[i-2]=='s' && i=5>=0){
s642634915
p03854
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { char buf1[20000]; strcpy(buf1,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
main.c: In function 'main': main.c:8:1: error: expected ';' before 'char' 8 | strcpy(buf1,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
s335166783
p03854
C++
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { string pattern[] = {"remaerd", "resare", "maerd", "esare"}; string S; cin >> S; //Sを反転 reverse(S.begin(), S.end()); cout << S.substr(S.length(),-5); int temp = 0; bool possible = true; while(tem...
a.cc: In function 'int main(int, const char**)': a.cc:10:5: error: 'reverse' was not declared in this scope 10 | reverse(S.begin(), S.end()); | ^~~~~~~
s107755077
p03854
Java
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String S=sc.next(); if(S.length()<5)System.out.println("NO"); StringBuilder s=new StringBuilder(S); ArrayList<String>de=new ArrayList<>(); de.add("dream"...
Main.java:29: error: reached end of file while parsing } ^ 1 error
s673970436
p03854
C++
#include <iostream> #include <cmath> #include <cstdio> #include <vector> #include <string> using namespace std; int main() { int flag = 1; int sum = 0; string s; cin >> s; reverse(s.begin(), s.end()); size_t dreamer, eraser, dream, erase; while (1) { dream = s.find("maerd"...
a.cc: In function 'int main()': a.cc:14:5: error: 'reverse' was not declared in this scope 14 | reverse(s.begin(), s.end()); | ^~~~~~~ a.cc:62:25: warning: NULL used in arithmetic [-Wpointer-arith] 62 | if (s[0] == NULL) | ^~~~
s771668094
p03854
C++
#include <iostream> #include <cmath> #include <cstdio> #include <vector> #include <string> using namespace std; int main() { int flag = 1; int sum = 0; string s; cin >> s; reverse(s.begin(), s.end()); while (1) { size_t dreamer, eraser, dream, erase; dream = s.find("maerd")...
a.cc: In function 'int main()': a.cc:14:5: error: 'reverse' was not declared in this scope 14 | reverse(s.begin(), s.end()); | ^~~~~~~
s633358993
p03854
C++
#include <iostream> #include <cmath> #include <cstdio> #include <vector> #include <string> using namespace std; int main() { int flag = 1; int sum = 0; string s; cin >> s; reverse(s.begin(), s.end()); while (1) { size_t dreamer, eraser, dream, erase; dream = s.find("maerd")...
a.cc: In function 'int main()': a.cc:14:5: error: 'reverse' was not declared in this scope 14 | reverse(s.begin(), s.end()); | ^~~~~~~
s183849696
p03854
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); /*String s = sc.next().substring(0,100000);*/ while(true){ if(s.equals("")){ System.out.println("YES"); return; }else if( (s.length()>=11)&&(s.substring(0,11).equals("dreameraser"))...
Main.java:8: error: cannot find symbol if(s.equals("")){ ^ symbol: variable s location: class Main Main.java:11: error: cannot find symbol }else if( (s.length()>=11)&&(s.substring(0,11).equals("dreameraser"))){ ^ symbol: variable s location: class Main Main.java:11: error: cannot f...
s880884953
p03854
C++
#include <iostream> #include <vector> #include <array> #include <cmath> using namespace std; #define ll long long int main() { // Value string S; string result = "YES"; // Input cin>>S; // Cal ll size = S.size(); ll cnt=0; for(;cnt<size-4;){ // string five = S.s...
a.cc: In function 'int main()': a.cc:32:24: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 32 | if(cnt<size-10 && tt = "dreameraser"){ | ~~~~~~~~~~~ ^~ ~~ | | | | bool ...
s047261366
p03854
C++
#include <iostream> #include <vector> #include <array> #include <cmath> using namespace std; #define ll long long int main_() { // Value string S; string result = "YES"; // Input cin>>S; // Cal ll size = S.size(); ll cnt=0; for(;cnt<size-4;){ // string five = S....
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s561058315
p03854
C++
#include <iostream> #include <vector> #include <array> #include <cmath> using namespace std; #define ll long long int main_() { // Value string S; string result = "YES"; // Input cin>>S; // Cal ll size = S.size(); ll cnt=0; for(;cnt<size-4;){ // string five = S.s...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s820741107
p03854
C++
#include <iostream> #include <vector> #include <array> #include <cmath> using namespace std; #define ll long long int main() { // Value string S; string result = "YES"; // Input cin>>S; // Cal ll size = S.size(); for(int cnt=0;cnt<size-5;){ // string five = S.substr...
a.cc: In function 'int main()': a.cc:36:8: error: 'cnt' was not declared in this scope; did you mean 'int'? 36 | if(cnt!=size) result="NO"; | ^~~ | int
s922920710
p03854
C++
#include <iostream> #include <vector> #include <array> #include <cmath> using namespace std; #define ll long long int main() { // Value string S; string result = "YES"; // Input cin>>S; // Cal ll size = S.size(); for(int cnt=0;cnt<size-5;){ // string five = S.substr(...
a.cc: In function 'int main()': a.cc:25:12: error: 'six' was not declared in this scope; did you mean 'sin'? 25 | if(six == "dreamer" || six == "eraser"){ | ^~~ | sin
s267148776
p03854
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); if( sc.next().length >100000 ){ System.out.println("NO"); return; } String s = sc.next(); while(true){ if(s.equals("")){ System.out.println("YES"); return; }else if( (s.l...
Main.java:7: error: cannot find symbol if( sc.next().length >100000 ){ ^ symbol: variable length location: class String 1 error
s398470424
p03854
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; string t=""; int s_size = s.size(); for (int i=0; i<s_size; ) { if (i+5 <= s_size && s.substr(i, 5) == "dream") { t += "dream"; i += 5; } else if (i+5 <= s_size && s.substr(i, 5) == "erase") { ...
a.cc:18:51: warning: multi-character character constant [-Wmultichar] 18 | } else if (i+2 <= s_size && s.substr(i, 2) == 'er') { | ^~~~ a.cc: In function 'int main()': a.cc:18:48: error: no match for 'operator==' (operand types are 'std::__cxx11::basic_stri...
s379389509
p03854
C++
#include<bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define pii pair<int,int> #define vi vector<int> #define all(a) (a).begin(),(a).end() #define F first #define S second #define sz(x) (int)x.size() #define hel...
a.cc: In function 'int main()': a.cc:26:17: error: 'strrev' was not declared in this scope; did you mean 'strsep'? 26 | strrev(a); | ^~~~~~ | strsep
s581473329
p03854
C++
#include <bits/stdc++.h> #define rep(i,n) REP(i,0,n) #define REP(i, a, n) for(int i = a; i < (int)n ; i++) using namespace std; string s; string list[4]; signed main(){ cin >> s; list[0] = "dream"; list[1] = "dreamer"; list[2] = "erase"; list[3] = "eraser"; int pos; bool flag = false; while(s.siz...
a.cc: In function 'int main()': a.cc:13:3: error: reference to 'list' is ambiguous 13 | list[0] = "dream"; | ^~~~ In file included from /usr/include/c++/14/list:65, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:150, from a.cc:1: /usr/include/c++/14/bits/stl_list....
s025154454
p03854
C++
#include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <deque> #include <queue> #include <stack> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> #include <bitset> #include <cmath> #include <cstdlib> #include <cstring> #include <...
a.cc: In function 'int main()': a.cc:42:9: error: conflicting declaration 'int x' 42 | int x = l % 5; | ^ a.cc:41:34: note: previous declaration as 'std::string x' 41 | string s="dream",t="dreamer",x="erase",y="eraser"; | ^ a.cc:43:9: error: no match fo...
s844405827
p03855
C++
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") //#include <boost/multiprecision/cpp_int.hpp> using namespace std; using dou =long double; string yes="yes"; string Yes="Yes"; string YES="YES"; strin...
a.cc:5:10: fatal error: atcoder/all: No such file or directory 5 | #include <atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.
s986748951
p03855
C++
// ----------------------------------- // author : MatsuTaku // country : Japan // created : 09/03/20 01:08:28 // ----------------------------------- #include <bits/stdc++.h> #include "../../../library/include/unionfind.hpp" using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_wi...
a.cc:8:10: fatal error: ../../../library/include/unionfind.hpp: No such file or directory 8 | #include "../../../library/include/unionfind.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s773864640
p03855
C++
#include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;++i) using namespace std; #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") class UnionFind { public: vector <int> par; // 各元の親を表す配列 vector <int> siz; // 素集合のサイズを表す配列(1 で初期化) // Constructor UnionFind(int ...
a.cc:55:1: error: extended character   is not valid in an identifier 55 |  std::cin.tie(0); | ^ a.cc: In function 'int main()': a.cc:55:1: error: '\U00003000std' has not been declared 55 |  std::cin.tie(0); | ^~~~~
s538610600
p03855
C++
#include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;++i) using namespace std; #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") class UnionFind { public: vector <int> par; // 各元の親を表す配列 vector <int> siz; // 素集合のサイズを表す配列(1 で初期化) // Constructor UnionFind(int ...
a.cc:55:1: error: extended character   is not valid in an identifier 55 |  std::cin.tie(nullptr); | ^ a.cc: In function 'int main()': a.cc:55:1: error: '\U00003000std' has not been declared 55 |  std::cin.tie(nullptr); | ^~~~~
s455569877
p03855
C++
#include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;++i) using namespace std; #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") class UnionFind { public: vector <int> par; // 各元の親を表す配列 vector <int> siz; // 素集合のサイズを表す配列(1 で初期化) // Constructor UnionFind(int ...
a.cc:55:1: error: extended character   is not valid in an identifier 55 |  std::cin.tie(nullptr); | ^ a.cc:25:14: error: 'll' has not been declared 25 | int root(ll x) { // 根の検索 | ^~ a.cc: In function 'int main()': a.cc:55:1: error: '\U00003000std' has not been declared 55 |  std::...
s044445377
p03855
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s531631432
p03855
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=2e5+5,M=2e4+5,inf=0x3f3f3f3f,mod=1e9+7; #define mst(a,b) memset(a,b,sizeof a) #define lx x<<1 #define rx x<<1|1 #define reg register #define PII pair<int,int> #define fi first #define se second #define pb push_back #define il inline int s1[N...
a.cc: In function 'int find(int, int*)': a.cc:16:35: error: no matching function for call to 'find(int&)' 16 | return x==s[x]?x:s[x]=find(s[x]); | ~~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/...
s658564961
p03855
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; using Graph = vector<vector<int>>; typedef long long ll; typedef pair<int, int> P; const int MOD = 1000000007; const int...
a.cc: In function 'int main()': a.cc:61:5: error: 'in' was not declared in this scope; did you mean 'yn'? 61 | in N, K, L; | ^~ | yn a.cc:62:12: error: 'N' was not declared in this scope 62 | cin >> N >> K >> L; | ^ a.cc:62:17: error: 'K' was not declared in this scope...
s576238639
p03855
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; using Graph = vector<vector<int>>; typedef long long ll; typedef pair<int, int> P; const int MOD = 1000000007; const int...
a.cc: In function 'int main()': a.cc:61:5: error: 'in' was not declared in this scope; did you mean 'yn'? 61 | in N, K, L; | ^~ | yn a.cc:62:12: error: 'N' was not declared in this scope 62 | cin >> N >> K >> L; | ^ a.cc:62:17: error: 'K' was not declared in this scope...
s171048920
p03855
C++
import collections NO_OF_DIMENSIONS = 2 no_of_edges_by_dim = [0] * NO_OF_DIMENSIONS n, no_of_edges_by_dim[0], no_of_edges_by_dim[1] = (int(x) for x in input().split()) graph_by_dimension = [[[] for _ in range(n + 1)] for _ in range(NO_OF_DIMENSIONS)] for dimension, no_of_edges in enumerate(no_of_edges_by_dim): g...
a.cc:1:1: error: 'import' does not name a type 1 | import collections | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s881148439
p03855
C++
#include <iostream> using namespace std; constexpr int nax = 2e5, no_of_dims = 2; int n, siz[no_of_dims], id[no_of_dims][nax + 1]; array< int, no_of_dims > spoj[nax + 1]; vector< int > gr[no_of_dims][nax + 1]; bool operator<(const array< int, no_of_dims >& mn, const array< int, no_of_dims >& wc) { for (int i = 0...
a.cc:7:26: error: elements of array 'std::array<int, 2> spoj [200001]' have incomplete type 7 | array< int, no_of_dims > spoj[nax + 1]; | ^~~~ a.cc:7:26: error: storage size of 'spoj' isn't known a.cc:8:1: error: 'vector' does not name a type 8 | vector< int > gr[no_of_dims][nax +...
s752437186
p03855
C++
#pragma GCC target ("avx2") #pragma GCC optimize ("unroll-loops") #pragma GCC optimize ("O3") #include "bits/stdc++.h" #include <unordered_set> #include <unordered_map> #include <random> using namespace std; typedef long long ll; const ll MOD = 1'000'000'007LL; /*998'244'353LL;*/ #define pb push_back #define mp make_pa...
a.cc:51:36: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]' 51 ...
s725317476
p03855
C++
#include <bits/stdc++.h> using namespace std; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } using ll = long long; const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; const i...
a.cc: In function 'int main()': a.cc:65:12: error: expected ';' before 'for' 65 | C.init(N) | ^ | ; 66 | for(int i = 0; i < K; i++){ | ~~~ a.cc:66:18: error: 'i' was not declared in this scope 66 | for(int i = 0; i < K; i++){ | ^
s368241542
p03855
C++
tes
a.cc:1:1: error: 'tes' does not name a type 1 | tes | ^~~
s237674686
p03855
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long #define all(x) (x).begin(),(x).end() template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; retur...
a.cc: In function 'int main()': a.cc:62:6: error: expected '}' at end of input 62 | } | ^ a.cc:30:12: note: to match this '{' 30 | int main() { | ^
s142011555
p03855
Java
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.*; public class D49 { static InputStream is; static PrintWriter out; static String INPUT = ""; static void solve() { int N = ni(); int K = ni();...
Main.java:7: error: class D49 is public, should be declared in a file named D49.java public class D49 { ^ 1 error
s215244219
p03855
Java
import javafx.util.Pair; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.*; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; static void solve() { int N = ...
Main.java:1: error: package javafx.util does not exist import javafx.util.Pair; ^ 1 error
s572535581
p03855
C++
#include <iostream> #include <string> #include <algorithm> #include <cstdio> #include <vector> #include <queue> #include <map> #include <numeric> #include <cmath> using namespace std; typedef long long int ll; #define all(x) x.begin(),x.end() const ll mod = 1e9+7; const ll INF = 1e9; const ll MAXN = 1e9; struct un...
a.cc: In function 'int main()': a.cc:79:41: error: expected ';' before '}' token 79 | cout << s[com[i]] << " " | ^ | ; 80 | }printf("\n"); | ~
s629151316
p03855
C++
#include <iostream> #include <iomanip> #include <utility> #include <cmath> #include <random> #include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <string> #include <algorithm> using namespace std; #define rep(i,n) for(int i = 0; i<n; ++i) #define REP(i,n) for(int i = 1; i<n; ++i) ...
a.cc: In function 'int main()': a.cc:54:33: error: expected primary-expression before '/' token 54 | ios::sync_with_stdio(false);/ | ^ a.cc:56:5: error: expected primary-expression before 'int' 56 | int n,k,l; cin>>n>>k>>l; int p,q; | ^~~ a.cc:56:21: error: ...
s213806603
p03855
C++
#include <iostream> #include <iomanip> #include <utility> #include <cmath> #include <random> #include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <string> #include <algorithm> using namespace std; #define rep(i,n) for(int i = 0; i<n; ++i) #define REP(i,n) for(int i = 1; i<n; ++i) ...
a.cc: In function 'int main()': a.cc:54:33: error: expected primary-expression before '/' token 54 | ios::sync_with_stdio(false);/ | ^ a.cc:56:5: error: expected primary-expression before 'int' 56 | int n,k,l; cin>>n>>k>>l; int p,q; | ^~~ a.cc:56:21: error: ...
s043803569
p03855
C++
1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^
s557798361
p03855
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<(n); i++) typedef pair<int,int> P; int par[400100],Rank[400100]; int n,k,l; void init(int n){ for(int i=0; i<n; i++){ par[i]=i; Rank[i]=0; } } int find(int x){ if(par[x]==x) return x; else return par[x]=find(pa...
a.cc: In function 'void unite(int, int)': a.cc:23:12: error: 'a' was not declared in this scope 23 | par[y]=a; | ^
s477315896
p03855
C++
#include<bits/stdc++.h> using namespace std; struct UF { vector<int> p; UF(int n) : p(n, -1) {} int r(int x) { if (p[x] < 0) return x; return p[x] = r(p[x]); } void m(int x, int y) { x = r(x); y = r(y); if (x == y) continue; if (-p[x] > -p[y]) swap(x, y); p[y] += p[x]; p[x] = y; ...
a.cc: In member function 'void UF::m(int, int)': a.cc:12:17: error: continue statement not within a loop 12 | if (x == y) continue; | ^~~~~~~~
s721885828
p03855
C++
#include<bits/stdc++.h> using namespace std; struct UF { vector<int> p; UF(int n) : p(n) {iota(p.begin(), p.end(), 0);} int r(int x) { if (p[x] == 0) return x; return p[x] = root(p[x]); } void m(int x, int y) { x = r(x); y = r(y); p[x] = y; } }; int main() { int n, k, l; cin >> n >> k >> ...
a.cc: In member function 'int UF::r(int)': a.cc:8:19: error: 'root' was not declared in this scope 8 | return p[x] = root(p[x]); | ^~~~
s580088802
p03855
C++
#include <bits/stdc++.h> using namespace std; struct UnionFind { vector<int> data; UnionFind(int sz) { data.assign(sz,-1); } bool unite(int x, int y) { x = find(x), y = find(y); if(x == y) return(false); if(data[x] > data[y]) swap(x,y); data[x] += data[y...
a.cc: In function 'int main()': a.cc:55:16: error: 'lower_bond' was not declared in this scope 55 | - lower_bond(s.begin(),s.end(),make_pair(g1.find(i),g2.find(i))) << ' '; | ^~~~~~~~~~
s900893798
p03855
C++
import java.util.Scanner; class PrintFlowerNumber { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); System.out.print("数字を入力してください:"); String numberString = stdIn.nextLine(); String print[][] = new String[10][5]; print[0][0] = "*****...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:11: error: expected ':' before 'static' 4 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:4:29: e...
s553990653
p03855
C++
For train and road, execute Union Find to get the index number of both group. For each city, put the pair of indices (r, t)into a map to count the number of cities
a.cc:1:1: error: 'For' does not name a type 1 | For train and road, execute | ^~~
s448825237
p03855
C++
#include <iostream> #include <bits/stdc++.h> using namespace std; typedef long long int ll; #define MAXSIZE 10000000; const int MAX = 510000; const int MOD = 1000000007; const long long INF = 1LL << 60; const ll MAXINDx = 3000; const ll MAXINDy = 3000; double dp[MAXINDx][MAXINDy] = {0}; vector<vector<int>> edges; ...
a.cc: In member function 'void UnionFind::unite(int, int)': a.cc:60:17: error: expected unqualified-id before '[' token 60 | if (rank[rx] < rank[ry]) | ^ a.cc:67:21: error: expected unqualified-id before '[' token 67 | if (rank[rx] == rank[ry]) | ...
s528752770
p03855
C++
#include <cstdio> #include <iostream> #include <tgmath.h> #include <queue> #include <cstring> #include <map> #include <set> typedef long long ll; using namespace std; const int MAX_N = 1000000; struct UnionFind{ vector<int> par; vector<int> rankTree; void init(int n){ for(int i=0;i<n;i++){ par.push_back...
a.cc: In function 'int main()': a.cc:67:9: error: 'u1' was not declared in this scope; did you mean 'y1'? 67 | u1.unite(p[i],q[i]); | ^~ | y1 a.cc:71:9: error: 'u2' was not declared in this scope 71 | u2.unite(r[i],s[i]); | ^~
s511157918
p03855
C++
#include <bits/stdc++.h> using namespace std; // template {{{ #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple #define lb lower_bound #define ub upper_bound #define f first #define s second #define resz resize #define sz(x) int((x).size()) #define all(x) (x).begin(), (x).end() ...
a.cc:134:21: error: reference to 'monostate' is ambiguous 134 | template<typename W=monostate> struct wedge { | ^~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80, from a.cc:1: /usr/include/c++/14/variant:1237:10: note: candidates are: 'str...
s093687293
p03855
C++
#include<bits/stdc++.h> using namespace std; class unionfind { vector<int> par, rank, size_; public: unionfind(int n) :par(n), rank(n), size_(n, 1) { iota(all(par), 0); } int find(int x) { if (par[x] == x)return x; return par[x] = find(par[x]); } void unite(int x, int y) ...
a.cc: In constructor 'unionfind::unionfind(int)': a.cc:7:14: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'? 7 | iota(all(par), 0); | ^~~ | std::filesystem::perms::all In file included from /usr/include/c++/14/filesystem:51, ...
s440913771
p03855
C++
// https://atcoder.jp/contests/abc049/tasks/arc065_b #include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; #define REP(i, n) FOR(i, 0, n) #define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i) #define ALL(obj) (obj).begin(), (obj).end() #define ALLR(obj) (obj).rbegin(), (obj).rend()...
a.cc: In function 'int main()': a.cc:51:29: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std:...
s209052021
p03855
C++
#include<bits/stdc++.h> using namespace std; class UnionFind{ private: vector<int> rank; vector<int> par; public: UnionFind(int n){ rank.resize(n); par.resize(n); for(int i = 0; i < n; i++){ par[i] = i; rank[i] = 0; } } bool same(int a, int ...
a.cc: In function 'int main()': a.cc:52:39: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std:...
s755096877
p03855
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <utility> #include <cmath> #include <vector> #include <queue> #include <set> #include <map> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; const ll mod = 1000000007; class UnionFind { public: ...
a.cc: In function 'int main()': a.cc:97:22: error: wrong number of template arguments (1, should be at least 2) 97 | map<pair<int, int>> mp; | ^~ In file included from /usr/include/c++/14/map:63, from a.cc:10: /usr/include/c++/14/bits/stl_map.h:102:11: note: provided f...
s604093448
p03855
C++
#include <bits/stdc++.h> using namespace std; struct UnionFind { vector<int> p; UnionFind(int N) : p(N) { for(int i=0; i<N; i++) p[i] = i; } int root(int x) { if (p[x] == x) return x; return p[x] = root(p[x]); } void unite(int x, int y) { int rx = root(x); int ry = root(y...
a.cc: In function 'int main()': a.cc:57:16: error: 'root' was not declared in this scope 57 | if(m.count(root(i+1))) | ^~~~
s345758974
p03855
C++
#include <bits/stdc++.h> #define pb push_back #define ll long long #define mp make_pair #define inf 1000000007 #define int long long using namespace std; ll par[114514]; ll rank[114514]; void init(int n){ for(int i=0;i<n;i++){ par[i] = i; rank[i]=0; } } ll find(ll x){ if(par[x] == x){ return x; }else{ retur...
a.cc: In function 'void init(long long int)': a.cc:13:17: error: reference to 'rank' is ambiguous 13 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/inc...
s941621647
p03855
C++
// D - 連結 / Connectivity #include <bits/stdc++.h> #include "../../template-proj/myMente.h" using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; #define rp(i,n) for(int i=0;i<(n);i++) #define up(i,s,e,d) for(int i=(s);i<(e);i+=(d)) #define ot(x) cout<<(x) #define ote(x) cout<<(x)<<e...
a.cc:3:10: fatal error: ../../template-proj/myMente.h: No such file or directory 3 | #include "../../template-proj/myMente.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s871255923
p03855
C++
#include <iostream> #include <fstream> #include <string> #include <cmath> #include <cstdio> #include <algorithm> #include <iomanip> #include <vector> #include <utility> #include <numeric> #include <stack> #include <queue> #include <map> #include <unordered_map> #define MOD 1000000007 #define int long long using namespa...
a.cc:62:5: error: redefinition of 'long long int urank [200000]' 62 | int urank[200000];//深さ | ^~~~~ a.cc:22:5: note: 'long long int urank [200000]' previously declared here 22 | int urank[200000];//深さ | ^~~~~ a.cc: In function 'void init2(long long int)': a.cc:67:9: error: 'urank2' was not de...
s058085010
p03855
Java
import sun.font.TrueTypeFont; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.*; public class Main { static List<HashSet<Integer>> group ; static List<HashSet<Integer>> group2 ; static int[] roads ; static int[] rialways ; public static void mai...
Main.java:65: error: illegal start of expression static int find_parent(int[] arr,int p,int i){ ^ 1 error
s652653776
p03855
Java
import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.*; public class Connectivity { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; Scanner in = new Scanner(inputStream); ...
Main.java:5: error: class Connectivity is public, should be declared in a file named Connectivity.java public class Connectivity { ^ 1 error
s610960737
p03855
C++
#include<bits/stdc++.h> #define rep(i,n,m) for(int i = (n); i <(m); i++) #define rrep(i,n,m) for(int i = (n) - 1; i >=(m); i--) using namespace std; using ll = long long; using pii = pair<int, int>; struct UnionFind { int n; vector<int> parent; vector<int> rank; UnionFind(int _n) :n(_n) { ...
a.cc: In function 'int main()': a.cc:89:25: error: 'struct UnionFind' has no member named 'fsind'; did you mean 'find'? 89 | p2 = uf_express.fsind(i); | ^~~~~ | find
s217390680
p03855
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() typedef long long ll; static const int INF (1<<30); class UnionFind { public: vector<int> Parent; UnionFind(int N) { Parent = vector<int>(N, -1); } int root(int A) { ...
a.cc: In function 'int main()': a.cc:75:12: error: expected '}' at end of input 75 | return 0; | ^ a.cc:41:12: note: to match this '{' 41 | int main() { | ^
s367764535
p03855
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<utility> #include<map> #include<set> #include<queue> #include<math.h> using namespace std; #define N (1000000000+7) #define INF 1e16 typedef pair<int,int> P; typedef long long ll; class UnionFind { public: vector<int>par, rank //vec...
a.cc:18:25: error: expected ';' at end of member declaration 18 | vector<int>par, rank | ^~~~ | ;
s341079238
p03855
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<utility> #include<map> #include<set> #include<queue> #include<math.h> using namespace std; #define N (1000000000+7) #define INF 1e16 typedef pair<int,int> P; typedef long long ll; class UnionFind { public: vector<int>par, rank //vec...
a.cc:18:25: error: expected ';' at end of member declaration 18 | vector<int>par, rank | ^~~~ | ; a.cc: In member function 'void UnionFind::init(int)': a.cc:27:25: error: 'node' was not declared in this scope 27 | node...
s966259385
p03855
C++
// #include <bits/stdc++.h> #include <algorithm> #include <iostream> #include <cstring> #include <vector> #include <cmath> #include <cstdio> #include <cstdlib> #include <string> // #include <deque> // #include <queue> // #include <array> // #include <ctime> // #include <list> #include <map> #include <set> // #include <...
a.cc: In function 'int main()': a.cc:105:22: error: wrong number of template arguments (1, should be at least 2) 105 | map<pair<pii, int>> ans; | ^~ In file included from /usr/include/c++/14/map:63, from a.cc:15: /usr/include/c++/14/bits/stl_map.h:102:11: note: provided...
s274172739
p03855
C++
#include<iostream> #include<algorithm> #include<set> #include<math.h> #include<vector> #include<sstream> #include<queue> #include<functional> #include<bitset> #include<cstdio> #include<iomanip> #include<map> #include<unordered_map> #include<unordered_set> #include <string.h> using ll = long long; #define rep(i, n) fo...
a.cc: In function 'int main()': a.cc:97:32: error: expected ';' before 'for' 97 | map<pair<int,int> ,int> s;1 | ^ | ; a.cc:98:10: error: 'i' was not declared in this scope 98 | reps(i, n){ | ^ a.cc:20:32: note: in def...
s452933952
p03855
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc:145:10: error: 'ivoid' does not name a type; did you mean 'void'? 145 | inline ivoid unite(int x, int y){ | ^~~~~ | void a.cc: In function 'int main()': a.cc:177:15: error: 'struct UnionFind' has no member named 'unite' 177 | rep(i, K) U.unite(p[i], q[i]); | ...
s891490571
p03855
C++
//file_name:ABC49_D.cpp #include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() #define max...
a.cc: In function 'int main()': a.cc:139:40: error: request for member 'push_back' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)((find(((int*)(& par1)), i) * n) + find(((int*)(& par2)), i))))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} ...
s535315778
p03855
C++
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF 1000000000000000 using namespace std; typedef long long ll; typedef double db; typedef string str; typedef pair<ll, ll> p; constexpr int M...
a.cc: In function 'int main()': a.cc:88:9: error: 'mp' was not declared in this scope; did you mean 'p'? 88 | mp[make_pair(a[i], b[i])]++; | ^~ | p a.cc:90:23: error: 'mp' was not declared in this scope; did you mean 'p'? 90 | REP(i, N){cout << mp[make_pair(a[i], b[i])] << ...
s025924881
p03855
C++
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF 1000000000000000 using namespace std; typedef long long ll; typedef double db; typedef string str; typedef pair<ll, ll> p; constexpr int M...
a.cc: In function 'int main()': a.cc:91:38: error: no match for 'operator<' (operand types are 'std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >' and 'std::set<std::pair<long long int, long long int> >::iterator' {aka 'std::_Rb_tree<std::pair<long long int, long long int>, std::pair<long long int,...