submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s976772544 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<string> S(N);
for (int i= 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end());
string out = "";
for (int i = 0; i < N; i++) {
out += S.at(i);
S.pop_front;
}
cout << out << endl;
}
| a.cc: In function 'int main()':
a.cc:15:7: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pop_front'
15 | S.pop_front;
| ^~~~~~~~~
|
s670649468 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<string> S(N);
for (int i= 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end());
string out "";
for (int i = 0; i < N; i++) {
out += S.at(i);
S.pop_front;
}
cout << out << endl;
}
| a.cc: In function 'int main()':
a.cc:12:14: error: expected initializer before string constant
12 | string out "";
| ^~
a.cc:14:5: error: 'out' was not declared in this scope
14 | out += S.at(i);
| ^~~
a.cc:15:7: error: 'class std::vector<std::__cxx11::basic_string<char> >' has ... |
s710391946 | p04044 | C++ | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template<class T, class U> inline bool chmax(T& a,U b) { if (a < b) { a = b; return 1; } return 0; }
template<class T, class U> inline bool chmin(T& a,U b) { if (a > b) { a = b; return 1; } return 0; }
int main() {
int n, l:
cin >> n >> l;
... | a.cc: In function 'int main()':
a.cc:8:13: error: found ':' in nested-name-specifier, expected '::'
8 | int n, l:
| ^
| ::
a.cc:8:12: error: 'l' has not been declared
8 | int n, l:
| ^
a.cc:9:9: error: qualified-id in declaration before '>>' token
... |
s868017816 | p04044 | Java | import java.util.*;
public class Main {
static int n,l;
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String[] str = scan.nextLine().split(" ");
n = Integer.valueOf(str[0]);
l = Integer.valueOf(str[1]);
List<i> list = new ArrayList<i>();
for (int i = 0;; i++) {
if (cou... | Main.java:11: error: cannot find symbol
if (count == n)
^
symbol: variable count
location: class Main
Main.java:16: error: cannot find symbol
count++;
^
symbol: variable count
location: class Main
2 errors
|
s467080626 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N, L;
cin >> N >> L;
vector<string> data(N);
for(int i = 0; i < N; i++){
cin << data[i];
}
sort(data.begin(), data.end());
for(int i = 0; i < N; i++){
cout << data[i];
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:9:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'})
9 ... |
s623191462 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,L;
cin >> N >> L;
vector<char> a(N);
for(int i=0;i<N;i++){
getline(cin,a.at(i));
}
sort(a.begin(),a.end());
string s;
for(int i=0;i<N;i++){
s.push_back(a.at(i));
}
cout << s << endl;
}
| a.cc: In function 'int main()':
a.cc:9:14: error: no matching function for call to 'getline(std::istream&, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
9 | getline(cin,a.at(i));
| ~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:55,
fro... |
s842493888 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,L;
cin >> N >> L;
vector<char> a(N);
cin >> a;
sort(a.begin(),a.end());
for(int i=0;i<N;i++){
cout << a.at(i);
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:8:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char>')
8 | cin >> a;
| ~~~ ^~ ~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<cha... |
s146391923 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,L;
cin >> N >> L;
vector<char> a(N);
cin >> a
sort(a.begin(),a.end());
for(int i=0;i<N;i++){
cout << a.at(i);
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:8:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char>')
8 | cin >> a
| ~~~ ^~ ~
| | |
| | std::vector<char>
| std::istream {aka std::basic_istream<char... |
s273339363 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<int> S(N);
for (int i = 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end());
string ans = S.at(0);
for (int i = 1; i < N; i++) {
ans += S.at(i);
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:12:20: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
12 | string ans = S.at(0);
| ~~~~^~~
|
s203180475 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<int> S(N);
for (int i = 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end());
for (int i = 0; i < N; i++) {
cout << (string)(S.at(i));
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:13:29: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
13 | cout << (string)(S.at(i));
| ^
In file included from /usr/include/c++/14/st... |
s622405804 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<int> S(N);
for (int i = 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end());
for (int i = 0; i < N; i++) {
cout << (string)S.at(i);
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:13:27: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
13 | cout << (string)S.at(i);
| ^
In file included from /usr/include/c++/14/string... |
s464502586 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,L;
cin >> N >> L;
vector<string> S(N);
for (int i = 0;i < N;i++) {
cin >> S.at(i);
}
for (int i = 0;i < N;i++) {
for (int j = 0;j < N;j++) {
if (S.at(j-1) < S.at(j)) {
string m = S.at(j)
S.at(j) = S.at(j-1)
... | a.cc: In function 'int main()':
a.cc:15:11: error: expected ',' or ';' before 'S'
15 | S.at(j) = S.at(j-1)
| ^
|
s116608845 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,L;
cin >> N >> L;
vector<string> S(N);
for (i = 0;i < N;i++) {
cin >> S.at(i);
}
for (i = 0;i < N;i++) {
for (j = 0;j < N;j++) {
if (S.at(j-1) < S.at(j)) {
string m = S.at(j)
S.at(j) = S.at(j-1)
S.at(... | a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
8 | for (i = 0;i < N;i++) {
| ^
a.cc:11:8: error: 'i' was not declared in this scope
11 | for (i = 0;i < N;i++) {
| ^
a.cc:12:10: error: 'j' was not declared in this scope
12 | for (j = 0;j < ... |
s261076673 | p04044 | C++ | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main()
{
string a[10000],n,t;
cin >> n >> t;
for(int i = 0;i < n;i++)
{
cin >> a[i];
}
sort(a,a+n);
for(int i = 0;i < n;i++)
{
cout << a[i];
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:21: error: no match for 'operator<' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
9 | for(int i = 0;i < n;i++)
| ~ ^ ~
| | |
| int std::string {aka std::__cxx11... |
s303412347 | p04044 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int i,N,L;
string ans="";
cin >> N >> L;
vector<string> v(N);
for(i = 0;i < n;i++)
cin >> v[i];
sort(v.begin(),v.end());
for(i = 0;i < n;i++)
ans += v[i];
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'n' was not declared in this scope
9 | for(i = 0;i < n;i++)
| ^
a.cc:12:17: error: 'n' was not declared in this scope
12 | for(i = 0;i < n;i++)
| ^
|
s598871575 | p04044 | C++ | #include <iostream>
using namespace std;
int main() {
int N, L;
string result;
cin >> N >> L;
string a[N];
for (int i=0; i<N; i++) cin >> a[i];
sort(a, a+N, <string>());
for(int i=0; i<N; i++){
result += a[i];
}
cout << result << endl;
}
| a.cc: In function 'int main()':
a.cc:12:14: error: expected primary-expression before '<' token
12 | sort(a, a+N, <string>());
| ^
a.cc:12:21: error: expected primary-expression before '>' token
12 | sort(a, a+N, <string>());
| ^
a.cc:12:23: error: expected primary-exp... |
s685044058 | p04044 | C++ | #include <iostream>
using namespace std;
int main() {
int N, L;
string result;
cin >> N >> L;
string a[N];
for (int i=0; i<N; i++) cin >> a[i];
sort(a, a+N);
for(int i=0; i<N; i++){
result += a[i];
}
cout << result << endl;
}
| a.cc: In function 'int main()':
a.cc:12:1: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(a, a+N);
| ^~~~
| short
|
s208120612 | p04044 | C++ | #include <iostream>
using namespace std;
int main() {
int N, L;
string result;
cin >> N >> L;
string a[N];
for (int i=0; i<N; i++) cin >> a[i];
sort(a, a+N);
for(int i=0; i<N; i++){
result += a[i];
}
cout << result << endl;
}
| a.cc: In function 'int main()':
a.cc:12:1: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(a, a+N);
| ^~~~
| short
|
s720549956 | p04044 | C++ | #include <iostream>
using namespace std;
int main() {
int N, L;
string result;
cin >> N >> L;
string a[N];
for (int i=0; i<N; i++) cin >> a[i];
sort(a, a+N);
for(int i=0; i<N; i++){
result += a[i];
}
cout << result << endl;
}
| a.cc: In function 'int main()':
a.cc:12:1: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(a, a+N);
| ^~~~
| short
|
s261256129 | p04044 | C++ | #include <iostream>
using namespace std;
int main() {
int N, L;
string result;
cin >> N >> L;
string a[N];
for (int i=0; i<N; i++) cin >> a[i];
sort(a, a+N);
for(int i=0; i<N; i++){
result += a[i];
}
cout << result << endl;
}
| a.cc: In function 'int main()':
a.cc:12:1: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(a, a+N);
| ^~~~
| short
|
s242552417 | p04044 | Java | import java.util.*;
public class Main {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int a, b = scan.nextInt(), scan.nextInt();
String[] ABC = new int[a];
String small = ABC[0];
String output = "";
for (int x : ABC)
{
ABC[x] = scan.next();
}
for (int i = 1; i <... | Main.java:6: error: ';' expected
int a, b = scan.nextInt(), scan.nextInt();
^
1 error
|
s511924008 | p04044 | Java | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int n, l;
n = in.nextInt();
l = in.nextInt();
String[] S = new String[n];
for (int i = 0; i < n; i++) S[i] = in.nextInt();
S.sort();
for (int i = 0; i < n; i++) System.out.print(S[i])... | Main.java:11: error: incompatible types: int cannot be converted to String
for (int i = 0; i < n; i++) S[i] = in.nextInt();
^
Main.java:12: error: cannot find symbol
S.sort();
^
symbol: method sort()
location: variable S of type String[]
2 errors
|
s121084318 | p04044 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int l = sc.nextInt();
String[] s = new String[n];
for(int i = 0; i < n; i++) {
s[i] = sc.next();
}
Collections.sort(s);
String ans = "";
... | Main.java:12: error: no suitable method found for sort(String[])
Collections.sort(s);
^
method Collections.<T#1>sort(List<T#1>) is not applicable
(cannot infer type-variable(s) T#1
(argument mismatch; String[] cannot be converted to List<T#1>))
method Collections.<T#2>sort(List<... |
s530824346 | p04044 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int length = sc.nextInt();
int number = sc.nextInt();
String[] strings = new String[number];
for(int i = 0; i < number; i++)
strings[i] = sc.next();
for(int i = 0; i <... | Main.java:24: error: cannot find symbol
System.out.println(sb);
^
symbol: variable sb
location: class Main
1 error
|
s656054539 | p04044 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int length = sc.nextInt();
int number = sc.nextInt();
String[] strings = new String[number];
for(int i = 0; i < number; i++)
strings[i] = sc.next();
for(int i = 0; i <... | Main.java:13: error: ')' expected
if(strings[j-1].compareTo(strings[j] > 0){
^
1 error
|
s837550934 | p04044 | C++ | #include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
int main() {
int N,L,i,j;
cin >> N >> L;
vector<string> v(N);
rep(i,N){
cin >> v(i);
}
sort(v.begin(),v.end());
rep(i,N){
c... | a.cc: In function 'int main()':
a.cc:13:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
13 | cin >> v(i);
| ~^~~
a.cc:17:14: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
17 | cout << v(i);
| ... |
s432999910 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
vector <string> v;
int n;
cin >> n;
while(n--)
{
string s;
cin >> s;
v.push_back(s);
v.sort(v.begin(), v.end());
}
for(int i = 0 ; i < v.end(); i++)
cout<<v[i];
return 0;
} | a.cc: In function 'int main()':
a.cc:13:7: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'sort'
13 | v.sort(v.begin(), v.end());
| ^~~~
a.cc:15:21: error: no match for 'operator<' (operand types are 'int' and 'std::vector<std::__cxx11::basic_string<char> >::iterato... |
s446798105 | p04044 | C++ | // _/ _/ _/_/_/ _/
//_/_/_/_/ _/_/ _/_/_/_/ _/_/ _/ _/_/
// _/ _/ _/ _/ _/ _/ _/_/_/ _/
//_/ _/ _/ _/ _/ _/ _/ _/ _/
// _/_/ _/_/ _/_/ _/_/ _/_/ _/
#include<iostream>
#include<algorithm>
#include<cmath>
#incl... | a.cc: In function 'int main()':
a.cc:29:9: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
29 | cin > s[i];
| ~~~ ^ ~~~~
| | |
| | std::string {aka std::__cxx... |
s576081394 | p04044 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std ;
int main(){
int n,l ;
cin >> n >> l ;
vector<string> a(n) ;
for(int i=0;i<n;i++) cin >> a.at(i) ;
sort(a.begin(),a.end()) ;
for(auto i:a) cout << i ;
cout << endl ;
} | a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
9 | vector<string> a(n) ;
| ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
3 | #include<algorithm>
+++ |+#include <vector>
4 | us... |
s153950296 | p04044 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(void)
{
int n ;
int l ;
vector<string> s(n) ;
cin >> n >> l ;
for(int i=0;i<n;i++){
cin >> s[i] ;
}
sort(s.begin(), s.end());
for(int i=0;i<n;i++){
cout << s[i] ;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:17:2: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(s.begin(), s.end());
| ^~~~
| short
|
s011055325 | p04044 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algoritm>
using namespace std;
int main() {
int n, l;
cin >> n >> l;
vector<string> strVec(n);
for (int i = 0; i < n; i++) {
cin >> setw(l) >> strVec[i];
}
sort(strVec.begin(), strVec.end());
string res = "";
for (... | a.cc:5:10: fatal error: algoritm: No such file or directory
5 | #include <algoritm>
| ^~~~~~~~~~
compilation terminated.
|
s057183896 | p04044 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
using namespace std;
int main() {
int n, l;
cin >> n >> l;
vector<string> strVec(n);
for (int i = 0; i < n; i++) {
cin >> setw(l) >> strVec[i];
}
sort(strVec.begin(), strVec.end());
string res = "";
for (int i = 0; i < n; i+... | a.cc: In function 'int main()':
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(strVec.begin(), strVec.end());
| ^~~~
| short
|
s549016767 | p04044 | C++ | int main(){
int n,l;
cin >> n;
cin >> l;
string str[l];
string ans;
for(int i=0;i<n;i++){
cin >> str[i];
}
sort(str,str+n);
for(int i=0;i<n;i++){
cout << str[i];
}
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> n;
| ^~~
a.cc:5:5: error: 'string' was not declared in this scope
5 | string str[l];
| ^~~~~~
a.cc:6:11: error: expected ';' before 'ans'
6 | string ans;
| ^~~~
... |
s553733266 | p04044 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main(void){
int N,L;
string s;
cin >> N >> L;
vector<string> v_s;
while(getline(cin, s)){
v_s.push_back(s);
}
sort(v_s.begin(),v_s.end());
s = "";
for(auto& t_s : v_s){
s += t_s;
... | a.cc: In function 'int main()':
a.cc:20:13: error: 't_s' was not declared in this scope; did you mean 'v_s'?
20 | cout << t_s;
| ^~~
| v_s
|
s169783930 | p04044 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main(void){
int N,L,i
string s;
cin << N << L;
vector<string> v_s;
while(getline(cin, s)){
v_s.push_back(s);
}
sort(v_s.begin(),v_s.end());
s = "";
for(auto& t_s : v_s){
s += t_s;
... | a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'string'
9 | string s;
| ^~~~~~
a.cc:10:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
10 | cin << N << L;
| ~~~ ^~ ~
| | |
... |
s898101104 | p04044 | C++ | #include<iostream>
#include<string>
using namespace std;
bool Smaller(char a[], int a_length, char b[], int b_length){
int i;
int min_length = a_length < b_length ? a_length : b_length;
for(i=0; i<min_length; i++){
if(a[i] < b[i])return true;
else if(a[i] > b[i]) return false;
}
return fal... | a.cc: In function 'int main()':
a.cc:27:10: error: 'string_length' was not declared in this scope
27 | cin >> string_length >> string_num;
| ^~~~~~~~~~~~~
a.cc:27:27: error: 'string_num' was not declared in this scope
27 | cin >> string_length >> string_num;
| ^~... |
s113253550 | p04044 | C++ | #include<iostream>
#include<string>
using namespace std;
bool Smaller(char a*, int a_length, char b*, int b_length){
int i;
int min_length = a_length < b_length ? a_length : b_length;
for(i=0; i<min_length; i++){
if(a[i] < b[i])return true;
else if(a[i] > b[i]) return false;
}
return false;... | a.cc:5:20: error: expected ',' or '...' before '*' token
5 | bool Smaller(char a*, int a_length, char b*, int b_length){
| ^
a.cc: In function 'bool Smaller(char)':
a.cc:7:26: error: 'a_length' was not declared in this scope; did you mean 'min_length'?
7 | int min_length = a_len... |
s247390772 | p04044 | C++ | #include<iostream>
#include<string>
#include<vector>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<std::string> strings;
int i;
for(i=0; i < string_num; i++){
std::string input;
std::cin >> input;
strings.push_back(input);
}
... | a.cc: In function 'int main()':
a.cc:39:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
39 | std::cout << result << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:... |
s309144444 | p04044 | C++ | #include<iostream>
#include<string>
int main(){
int string_length;
int string_num;
cin >> string_length >> string_num;
std::vector<string> strings;
int i;
for(i=0; i < string_num; i++){
string input;
cin >> input;
strings.push_back(input);
}
string result;
while(strings.... | a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> string_length >> string_num;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ... |
s851995505 | p04044 | C++ | #include <iostream>
#include <cstdio>
#include <math.h>
#include <vector>
using namespace std;
typedef long long int ll;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define vsort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end());
const int MOD = 1000000007;
const int INF = INT_MAX;
const do... | a.cc:17:17: error: 'INT_MAX' was not declared in this scope
17 | const int INF = INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <vector>
+++ |+#include <climits>
5 |
a.cc: In function... |
s896013784 | p04044 | C++ | #include <iostream>
#include <cstdio>
#include <math.h>
#include <vector>
using namespace std;
typedef long long int ll;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define vsort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end());
const int MOD = 1000000007;
const int INF = INT_MAX;
const do... | a.cc:17:17: error: 'INT_MAX' was not declared in this scope
17 | const int INF = INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include <vector>
+++ |+#include <climits>
5 |
a.cc: In function... |
s509497501 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string ans, ct[109];
int n, l;
cin >> n >> l;
for(int i = 0; i < n; i++)
cin >> ct[i];
sort(ct.begin(),ct.end());
ans = ct[0];
for(int i = 1; i < n; i++)
ans = ans + ct[i];
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:10:11: error: request for member 'begin' in 'ct', which is of non-class type 'std::string [109]' {aka 'std::__cxx11::basic_string<char> [109]'}
10 | sort(ct.begin(),ct.end());
| ^~~~~
a.cc:10:22: error: request for member 'end' in 'ct', which is of non-class typ... |
s918025019 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string ans, ct[109];
int n, l;
cin >> n >> l;
for(int i = 0; i < n; i++)
ct.push_back(i);
sort(ct.begin(),ct.end());
ans = ct[0];
for(int i = 1; i < n; i++)
ans = ans + ct[i];
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:9:8: error: request for member 'push_back' in 'ct', which is of non-class type 'std::string [109]' {aka 'std::__cxx11::basic_string<char> [109]'}
9 | ct.push_back(i);
| ^~~~~~~~~
a.cc:10:11: error: request for member 'begin' in 'ct', which is of non-class type '... |
s003799130 | p04044 | C++ | #include<iostream>
#include<stack>
#include<string>
using namespace std;
int main()
{
int n,l;
cin>>n>>l;
string s[n];
for(int i=0;i<n;i++)
{
cin>>s[i];
}
sort(s,s+n);
string res;
for(int i=0;i<n;i++)
{
res+=s[i];
}
cout<<res<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'short'?
16 | sort(s,s+n);
| ^~~~
| short
|
s146335317 | p04044 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String[] arr = line.split("\\s");
int n = Integer.parseInt(arr[0]);
int l = Integer.parseInt(arr[1]);
List<String> ss = new ArrayList<>();
while(sc.hasNextLine()) {
... | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:8: error: cannot find symbol
... |
s517653814 | p04044 | C++ | n,l = map(int,input().split())
s=[]
for _ in range(n):
s.append(input())
s.sort()
print(''.join(s)) | a.cc:6:7: error: empty character constant
6 | print(''.join(s))
| ^~
a.cc:1:1: error: 'n' does not name a type
1 | n,l = map(int,input().split())
| ^
|
s007177879 | p04044 | C++ | #include<iostream>
#include<stdlib.h>
#include<string>
#include<string.h>
using namespace std;
int main(){
int N,L;
cin>>N>>L;
if(N<1){cout<<"N value should be >=1"<<endl; exit(0);}
if(L<1||L>100){cout<<"L value out of bounds... 1<=L<100"<<endl;exit(0);}
char A[N][L],b,T[L*N];
for(int i=0;i<N-1;i++)
if(strcmp(A[i],A[i... | a.cc: In function 'int main()':
a.cc:15:7: error: invalid conversion from 'char*' to 'char' [-fpermissive]
15 | {b=A[i];A[i]=A[i+1];A[i+1]=b;}
| ~~~^
| |
| char*
a.cc:15:13: error: invalid array assignment
15 | {b=A[i];A[i]=A[i+1];A[i+1]=b;}
| ~~~~^~~~~~~
a.cc:15:27:... |
s818399396 | p04044 | C++ | #include<iostream>
#include<stdlib.h>
#include<string>
#include<string.h>
using namespace std;
int main(){
int N,L;
cin>>N>>L;
if(N<1){cout<<"N value should be >=1"<<endl; exit(0);}
if(L<1||L>100){cout<<"L value out of bounds... 1<=L<100"<<endl;exit(0);}
string A[N],b,T;
for(int i=0;i<N-1;i++)
if(strcmp(A[i],A[i+1])>0... | a.cc: In function 'int main()':
a.cc:14:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
14 | if(strcmp(A[i],A[i+1])>0)
| ~~~^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:4:
... |
s828956797 | p04044 | C++ | #include<iostream>
#include<stdlib.h>
#include<string>
using namespace std;
int main(){
int N,L;
cin>>N>>L;
if(N<1){cout<<"N value should be >=1"<<endl; exit(0);}
if(L<1||L>100){cout<<"L value out of bounds... 1<=L<100"<<endl;exit(0);}
string A[N],b,T;
for(int i=0;i<N-1;i++)
if(strcmp(A[i],A[i+1])>0)
{b=A[i];A[i]=A[i+1... | a.cc: In function 'int main()':
a.cc:12:4: error: 'strcmp' was not declared in this scope
12 | if(strcmp(A[i],A[i+1])>0)
| ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<stdlib.h>
+++ |+#include <cstring>
3 | #... |
s190706510 | p04044 | C++ | #include<iostream.h>
#include<stdlib.h>
#include<string>
using namespace std;
int main(){
int N,L;
cin>>N>>L;
if(N<1){cout<<"N value should be >=1"<<endl; exit(0);}
if(L<1||L>100){cout<<"L value out of bounds... 1<=L<100"<<endl;exit(0);}
string A[N],b,T;
for(int i=0;i<N-1;i++)
if(strcmp(A[i],A[i+1])>0)
{b=A[i];A[i]=A[i... | a.cc:1:9: fatal error: iostream.h: No such file or directory
1 | #include<iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s354404998 | p04044 | C++ | # cook your dish here
s=input()
m=s.split()
n=int(s[0]);
l=int(s[2]);
list=[]
for i in range(n):
st=input()
list.append(st)
list.sort()
for i in list:
print(i,end="")
| a.cc:1:3: error: invalid preprocessing directive #cook
1 | # cook your dish here
| ^~~~
a.cc:2:1: error: 's' does not name a type
2 | s=input()
| ^
a.cc:5:1: error: 'l' does not name a type
5 | l=int(s[2]);
| ^
a.cc:6:1: error: 'list' does not name a type
6 | list=[]
| ^~~~
|
s978195225 | p04044 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
int N, L, i;
cin >> N;
cin >> L;
vector<int> A(S, S+N);
for (i=0; i<N; i++){
cin >> A[i];
}
sort(A.begin(), A.end());
for(i=0; i<N; i++){
cout << A[i];
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:19: error: 'S' was not declared in this scope
10 | vector<int> A(S, S+N);
| ^
|
s567142102 | p04044 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
int N, L, i;
cin >> N;
cin >> L;
vector<int> A(data, data+N);
for (i=0; i<N; i++){
cin >> A[i];
}
sort(A.begin(), A.end());
for(i=0; i<N; i++){
cout << A[i];
}
return... | a.cc: In function 'int main()':
a.cc:10:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
10 | vector<int> A(data, data+N);
| ~~~~^~
|
s571280046 | p04044 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
int N, L, i;
cin >> N;
cin >> L;
vector<int> A(data, data+N)
for (i=0; i<N; i++){
cin >> A[i];
}
sort(A.begin(), A.end());
for(i=0; i<N; i++){
cout << A[i];
}
return ... | a.cc: In function 'int main()':
a.cc:10:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
10 | vector<int> A(data, data+N)
| ~~~~^~
a.cc:12:5: error: expected ',' or ';' before 'for'
12 | for (i=0; i<N; i++){
| ... |
s451381830 | p04044 | C++ | #include<iostream>
using namespace std;
int main() {
int N, L, i;
cin >> N;
cin >> L;
string S;
for (i=0; i<N; i++){
cin >> S[i];
}
sort(S.begin(), S.end));
for(i=0; i<N; i++){
cout << s[i];
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(S.begin(), S.end));
| ^~~~
| short
a.cc:16:17: error: 's' was not declared in this scope
16 | cout << s[i];
| ^
|
s640400069 | p04044 | C++ | #include<iostream>
using namespace std;
int main() {
int N, L, i;
cin >> N;
cin >> L;
steing S;
for (i=0; i<N; i++){
cin >> S[i];
}
sort(S.begin(), S.end));
for(i=0; i<N; i++){
cout << s[i];
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'steing' was not declared in this scope; did you mean 'stdin'?
9 | steing S;
| ^~~~~~
| stdin
a.cc:11:16: error: 'S' was not declared in this scope
11 | cin >> S[i];
| ^
a.cc:13:10: error: 'S' was not declared i... |
s208262929 | p04044 | C++ | #include<iostream>
using namespace std;
int main() {
int N, L, i;
cin >> N;
cin >> L;
steing s;
for (i=0; i<N; i++){
cin >> s[i];
}
sort(A.begin(), A.end));
for(i=0; i<N; i++){
cout << s[i];
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'steing' was not declared in this scope; did you mean 'stdin'?
9 | steing s;
| ^~~~~~
| stdin
a.cc:11:16: error: 's' was not declared in this scope
11 | cin >> s[i];
| ^
a.cc:13:10: error: 'A' was not declared i... |
s362380474 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
#include <algorithm>
#define rep(i, N) for (int i = 0; i < (N); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
using ll = long long;
using i_i = tuple<int, int>;
int main(){
int N,L;
cin >> N >> L;
vector<string> S(N);
rep(i, N) cin >> ... | a.cc: In function 'int main()':
a.cc:19:13: error: 'join' was not declared in this scope
19 | cout << join(S,"");
| ^~~~
|
s834146578 | p04044 | C++ | #include <bits/stdc++.h>
using namespaces td;
int main() {
int n, l; cin >> n >> l;
vector<string> v(n);
for (int i = 0; i < n; i++) cin >> v[i];
sort(v.begin(), v.end());
for (int i = 0; i < n; i++) cout << v[i];
cout << endl;
} | a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
2 | using namespaces td;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:4:13: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | int n, l; cin >> n >> l;
| ^~~
| std::c... |
s423256341 | p04044 | Java | import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int N = Integer.parseInt(str);
str = scan.next();
int L = Integer.parseInt(str);
List<String> list = new ArrayList<>();
... | Main.java:18: error: '(' or '[' expected
String ans = new String;
^
1 error
|
s433392167 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int N;
int L;
cin >> N >> L;
vector<string> S(N);
for (int i = 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end()); // 昇順にソート
for (int i = 0; i < N; i++) {
cout >> S.at(i);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:19:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'})
1... |
s126675379 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int N;
int L;
cin >> N >> L;
vector<string> S(L);
for (int i = 0; i < N; i++) {
cin >> S.at(i);
}
sort(S.begin(), S.end()); // 昇順にソート
for (int i = 0; i < N; i++) {
cout >> S.at(i);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:19:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'})
1... |
s059851871 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, l; cin >> n >> l;
string s[n];
for(int i = 0; i < n; i++)
cin >> s[i];
sort(s.begin(), s.end());
for(int i = 0; i < n; i++)
cout << s[i];
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:10: error: request for member 'begin' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
11 | sort(s.begin(), s.end());
| ^~~~~
a.cc:11:21: error: request for member 'end' in 's', which is of non-class type 'std::... |
s363390956 | p04044 | C++ | #include <bits/stdc++.h>
#define rep(i, k) for (ll i = 0; i < k; i++)
#define pair(x, y) make_pair((x), (y))
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int main() {
int ans = 0;
int n, l;
cin >> n >> l;
vector<string> s(n);
rep(i, n) { cin >> s[i]; }
sort(s.begin, ... | a.cc: In function 'int main()':
a.cc:16:9: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
16 | sort(s.begin, s.end);
| ~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
from /usr/in... |
s215890714 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n,l;
cin >>n>>l;
vector<string> vecS;
while(n--)
{
string s;
cin >> s;
vecS.push_back(s);
}
sort(vecS.begin(), vecS.end());
for(auto i: vecS)
{
... | a.cc:22:121: error: expected class-name before '~' token
22 | ~ ~
| ^
|
s930331843 | p04044 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <vector>
#define rep(i,n) for(int i=0; i< int(n); i++)
using namespace std;
int main(){
int n, l;
cin >> n >> l;
string s[n];
rep(i,n) cin >> s[i];
sort(s, s+n);
string ans ;
rep(i,l) ans += s[i]
cout << ans << endl;
} ... | a.cc: In function 'int main()':
a.cc:17:29: error: expected ';' before 'cout'
17 | rep(i,l) ans += s[i]
| ^
| ;
18 | cout << ans << endl;
| ~~~~
|
s726651346 | p04044 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <vector>
#define rep(i,n) for(int i=0; i< int(n); i++)
using namespace std;
int main(){
int n, l;
cin >> n >> l;
rep(i,n) cin >> s[i];
sort(s, s+n);
string ans ;
rep(i,l) ans += s[i]
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:13:25: error: 's' was not declared in this scope
13 | rep(i,n) cin >> s[i];
| ^
a.cc:14:14: error: 's' was not declared in this scope
14 | sort(s, s+n);
| ^
|
s958416786 | p04044 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <vector>
#define rep(i,n) for(int i=0; i< int(n); i++)
using namespace std;
int main(){
int n, l;
string s;
cin >> n >> l >> s;
sort(s, s+n);
string ans ;
rep(i,l) ans += s[i]
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:14:18: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
14 | sort(s, s+n);
| ~^~
| | |
| | int
| std::string {aka st... |
s750743913 | p04044 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int N, L;
cin >> N >> L;
string tmp;
string str[N];
for(int i = 0; i < N; i++){
cin >> str[i];
}
for(int i = 0; i < N; i++){
for(int j = i + 1; j < N; j++){
if(str[i].conpare(str[j]) < 0){
tmp = str[i];
... | a.cc: In function 'int main()':
a.cc:17:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'conpare'; did you mean 'compare'?
17 | if(str[i].conpare(str[j]) < 0){
| ^~~~~~~
| compare
|
s322912710 | p04044 | C++ | #pragma once
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <queue>
#include <list>
#include <vector>
#include <array>
#include <algorithm>
#include <iterator>
bool compare(const std::string& _lhs, const std::string& _rhs)
{
for (int i = 0; i < _lhs.size(); ... | a.cc:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
/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
|
s677514288 | p04044 | C++ | bool compare(const std::string& _lhs, const std::string& _rhs)
{
for (int i = 0; i < _lhs.size(); i++)
{
if (i >= _rhs.size() ) return false;
if (_lhs[i] > _rhs[i]) return false;
else if (_lhs[i] < _rhs[i]) return true;
}
return _lhs.size() <= _rhs.size();
}
int main()
{
int N, L = -1;
std::vector<std::... | a.cc:1:25: error: 'string' in namespace 'std' does not name a type
1 | bool compare(const std::string& _lhs, const std::string& _rhs)
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>... |
s128220049 | p04044 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,L;cin>>N,L;
vector<string> S(N);
string A="";
for(int i=0; i<N; i++){
cin>>S.at(i);}
sort(S.begin(),b.end());
for(int i=0; i<N; i++){
A += S.at(i);}
cout<<A<<endl;
}
| a.cc: In function 'int main()':
a.cc:12:16: error: 'b' was not declared in this scope
12 | sort(S.begin(),b.end());
| ^
|
s093208251 | p04044 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
vector<string>s(b);
for(int i=0;i<n;i++){
cin >> s[i];
}
sort(s.begin(),s.end());
for(int i=0;i<n;i++){
cout << s[i];
}
}
| a.cc: In function 'int main()':
a.cc:7:23: error: 'n' was not declared in this scope
7 | for(int i=0;i<n;i++){
| ^
a.cc:11:23: error: 'n' was not declared in this scope
11 | for(int i=0;i<n;i++){
| ^
|
s595456205 | p04044 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
vector<string>s(n);
for(int i=0;i<n;i++){
cin >> s[i];
}
sort(s.begin(),s.end());
for(int i=0;i<n;i++){
cout << s[i];
}
} | a.cc: In function 'int main()':
a.cc:6:19: error: 'n' was not declared in this scope
6 | vector<string>s(n);
| ^
|
s322204717 | p04044 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
string s[b];
for(int i=0;i<b;i++){
cin >> s[i];
}
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(s[i]>s[j]){
swap(s[i],s[j]);
}
}
}
for(int i=0;i<b;i++){
cout << s[i];
}
}
| a.cc: In function 'int main()':
a.cc:10:17: error: 'n' was not declared in this scope
10 | for(int i=0;i<n;i++){
| ^
|
s152897604 | p04044 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
string s[b];
for(int i=0;i<b;i++){
cin >> s[i];
}
sort(s,s+b);
for(int i=00;i<b;i++){
cout << s[i];
}
| a.cc: In function 'int main()':
a.cc:13:4: error: expected '}' at end of input
13 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s146920653 | p04044 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n, l;
cin>>n>>l;
vector<string> arr(n);
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
sort(arr.begin(), arr.end());
for(int i=0;i<n;i++)
{
cout<<arr[i]<<endl;
}
return 0; | a.cc: In function 'int main()':
a.cc:18:12: error: expected '}' at end of input
18 | return 0;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s535638296 | p04044 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,l;
cin>>n>>l;
vector< string > s(n);
for(int i=0;i<n;i++)
cin>>s.at(i);
sort(s.begin(),s.end());
for(i=1;i<n;i++)
s.at(0)=s.at(0)+s.at(i);
cout<<s.at(0)<<endl;
} | a.cc: In function 'int main()':
a.cc:11:13: error: 'i' was not declared in this scope
11 | for(i=1;i<n;i++)
| ^
|
s071672060 | p04044 | C++ | #include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long int ll;
typedef unsigned long lon... | a.cc: In function 'int main()':
a.cc:44:40: error: expected primary-expression before ';' token
44 | #define outv(v) for(auto i:v){cout<<i<<;}cout<<'\n';
| ^
a.cc:62:5: note: in expansion of macro 'outv'
62 | outv(a);
| ^~~~
|
s727421860 | p04044 | C++ | clude<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
string s[100];
for(int i=0;i<n;i++){
cin>>s[i];
}
sort(s,s+n);
for(int i=0;i<n;i++0)
{
cout<<s[i];
}
} | a.cc:1:1: error: 'clude' does not name a type
1 | clude<bits/stdc++.h>
| ^~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin>>n;
| ^~~
a.cc:7:7: error: 'string' was not declared in this scope
7 | string s[100];
| ^~~~~~
a.cc:1... |
s145999958 | p04044 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
string s[100];
for(int i=0;i<n;i++){
cin>>s[i];
}
sort(s,s+n);
for(int i=0;i<n;i++0
{
cout<<s[i];
}
} | a.cc: In function 'int main()':
a.cc:13:22: error: expected ')' before numeric constant
13 | for(int i=0;i<n;i++0
| ~ ^
| )
a.cc:13:23: error: expected ';' before '{' token
13 | for(int i=0;i<n;i++0
| ^
| ... |
s535270253 | p04044 | C++ | n,l=map(int,input().split())
s=sorted([input() for i in range(n)])
print(*s,sep="") | a.cc:1:1: error: 'n' does not name a type
1 | n,l=map(int,input().split())
| ^
|
s888630879 | p04044 | C++ | #include<iostream>
#include<vector>
using namesapce std;
vector<string> v;
int main(){
string s1;
int n,m;
cin>>n>>m;
for(int i = 0; i < n; ++i){
cin>>s1;
v.push_back(s1);
}
sort(v.begin(), v.end());
for (string &s : v)
cout << s;
} | a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
3 | using namesapce std;
| ^~~~~~~~~
a.cc:5:1: error: 'vector' does not name a type
5 | vector<string> v;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
7 | string ... |
s920253619 | p04044 | C++ | //
// main.cpp
// Practice
//
// Created by Hajime Sakamoto on 2019/12/17.
// Copyright © 2019 Hajime Sakamoto. All rights reserved.
// http://7ujm.net/stl/sort.html
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
//数N,長さLの文字列を辞書順にソートして結合するクラス... | a.cc: In member function 'void Iroha::s_join()':
a.cc:47:50: error: 'ostream_iterator' is not a member of 'std'
47 | std::copy(data.begin(), data.end(), std::ostream_iterator<std::string>(os));
| ^~~~~~~~~~~~~~~~
a.cc:14:1: note: 'std::ostream_iterator' ... |
s899883396 | p04044 | C++ | #include <bits/stdc++.h>
#include <vector>
using namespace std;
int main(){
int L,N;
int flag = 1;
vector<string> S(N);
cin >> L >> N;
for(int i=0;i<N;i++){
cin >> S.at(i);
}
for(i : S){
if(i.size != L) flag = 0;
}
sort(S.begin(),S.end());
string su... | a.cc:8:15: error: extended character is not valid in an identifier
8 | int flag = 1;
| ^
a.cc: In function 'int main()':
a.cc:8:15: error: '\U000030001' was not declared in this scope
8 | int flag = 1;
| ^~~
a.cc:15:11: error: found ':' in nested-name-specifier,... |
s679007892 | p04044 | C++ | #include <bits/stdc++.h>
//#include <vector>
using namespace std;
int main(){
int L,N;
vector<string> S(N);
cin >> L >> N;
for(int i=0;i<N;i++){
cin >> S.at(i);
}
sort(S.begin(),S.end());
string sum;
for(aut S_dash : S){
sum = S_dash;
}
cout << sum << endl;
} | a.cc: In function 'int main()':
a.cc:16:9: error: 'aut' was not declared in this scope; did you mean 'auto'?
16 | for(aut S_dash : S){
| ^~~
| auto
a.cc:20:1: error: expected primary-expression before '}' token
20 | }
| ^
a.cc:19:25: error: expected ')' before '}' token
19... |
s288305476 | p04044 | C++ | #include <stdio.h>
#include <string.h>
char c[110][110],d[150];
int n,l,i,j;
int main()
{
scanf("%d%d",&n,&l);
getchar();
for(i=0;i<n;i++)
gets(c[i]);
for(i=0;i<n-1;i++)
{
for(j=0;j<n-i-1;j++)
if(strcmp(c[j],c[j+1])>0)
{
strcpy(d,c[j]);
strcpy(c[j],c[j+1]);
strcpy(c[j+1],d);
... | a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(c[i]);
| ^~~~
| getw
|
s096099601 | p04044 | C++ | #include <stdio.h>
#include <string.h>
char c[110][110],d[150];
int n,l,i,j;
int main()
{
scanf("%d%d",&n,&l);
getchar();
for(i=0;i<n;i++)
gets(c[i]);
for(i=0;i<n-1;i++)
{
for(j=0;j<n-i-1;j++)
if(strcmp(c[j],c[j+1])>0)
{
strcpy(d,c[j]);
strcpy(c[j],c[j+1]);
strcpy(c[j+1],d);
... | a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(c[i]);
| ^~~~
| getw
|
s747706014 | p04044 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define Unknown ios_base::sync_with_stdio(0);ios::sync_with_stdio(0);cin.tie(nullptr);cout.tie(nullptr);... | a.cc:57:29: error: ISO C++ forbids declaration of 're' with no type [-fpermissive]
57 | template<class... T> inline re(T&... args) { ((cin >> args), ...); }
| ^~
a.cc: In function 'int re(T& ...)':
a.cc:57:68: warning: no return statement in function returning non-void [-Wreturn-typ... |
s347787705 | p04044 | C | #include<stdio.h>
int main()
{
int N,L,i=1,j=1,S[101],T[101];
//char
scanf("%d%d",&N,&L);
for(;j<=100;j++) //定义 “字典”
{
S[j]=('a'+j-1);
}
j=1;
while(j<=100)
{
printf("%c\n",S[j]); //验证是否成功赋值
j++;
}*/
for(;i<=N;i++) //输入N个字符串
{
scanf("%s",&T[i]);
}
T[1]=1,T[2]=2;
printf("%d%d\n",T[... | main.c: In function 'main':
main.c:16:11: error: expected expression before '/' token
16 | }*/
| ^
|
s459469161 | p04044 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | In file included from /usr/include/c++/14/queue:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<std::__cxx11::basic_string<char>, std::vector<int>, std::greater<int> >':
a... |
s998845420 | p04044 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Ite... |
s058557605 | p04044 | C | #include<stdio.h>
#include<string.h>
void str_swap(char str1[],char str2[])
{
char str[128];
strcpy(str,str1);
strcpy(str1,str2);
strcpy(str2,str);
}
int dictionary(char str1[],char str2[])
{
int ans,i,len;
if(strlen(str1) < strlen(str2))
{
len = strlen(str1);
ans = 1;
}else
{
len = strlen(str2);
ans... | main.c: In function 'main':
main.c:49:13: error: 'i' undeclared (first use in this function)
49 | for(i=0;i<num;i++)
| ^
main.c:49:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:56:21: error: 'j' undeclared (first use in this function)
5... |
s466680706 | p04044 | C | #include<stdio.h>
#include<string.h>
void str_swap(char str1[],char str2[])
{
char str[128];
strcpy(str,str1);
strcpy(str1,str2);
strcpy(str2,str);
}
int dictionary(char str1[],char str2[])
{
int ans,i,len;
if(strlen(str1) < strlen(str2))
{
len = strlen(str1);
ans = 1;
}else
{
len = strlen(str2);
ans... | main.c: In function 'main':
main.c:49:13: error: 'i' undeclared (first use in this function)
49 | for(i=0;i<num;i++)
| ^
main.c:49:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:56:21: error: 'j' undeclared (first use in this function)
5... |
s407350851 | p04044 | C++ | import math
line = input()
n, l = [int(x) for x in line.split()]
strings = []
for i in range (n):
strings.append(input())
strings.sort()
seperator = ''
print(seperator.join(strings))
| a.cc:9:13: error: empty character constant
9 | seperator = ''
| ^~
a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s580857966 | p04044 | C++ | #include<iosream>
#include<algorithm>
#include<string>
#include<vector>
int main() {
int N, L;
std::cin >> N >> L;
std::vector<std::string> data(N);
for (int i=0; i<N; i++) {
std::cin >> data.at(i);
}
std::sort(data.begin(), data.end());
for (int i=0; i<N; i++) {
std::cout << data.at(i);
}
st... | a.cc:1:9: fatal error: iosream: No such file or directory
1 | #include<iosream>
| ^~~~~~~~~
compilation terminated.
|
s659537504 | p04044 | Java | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] strings = new String[Integer.parseInt(scanner.nextLine().split(" ")[1])];
for(int i = 0; i < strings.length; i++) {
strings[i] = scanner.nextLine... | Main.java:13: error: reference to println is ambiguous
System.out.println(Arrays.stream(strings).sorted().collect(
^
both method println(char[]) in PrintStream and method println(String) in PrintStream match
Main.java:13: error: incompatible types: inference variable R has incompatible bounds
System.o... |
s321351019 | p04044 | Java | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] strings = new String[Integer.parseInt(scanner.nextLine().split(" ")[1])];
for(int i = 0; i < strings.length; i++) {
strings[i] = scanner.nextLine... | Main.java:13: error: reference to println is ambiguous
System.out.println(Arrays.stream(strings).sorted().collect(
^
both method println(char[]) in PrintStream and method println(String) in PrintStream match
Main.java:13: error: incompatible types: inference variable R has incompatible bounds
System.o... |
s242951276 | p04044 | C | #include<stdio.h>
void sort(int left,int right);
int strcom(char *pword1,char *pword2);
char *pstr[100];
int main(){
int N,L;
int i,j,k=0,len=0;
char str[101];
scanf("%d %d",&N,&L);
char word[N*(L+1)];
*pstr[k++]=word[0];
for(i=0;i<N;i++){
scanf("%s",str);
j=0;
do{
word[len++]=str[j++];... | main.c: In function 'strcom':
main.c:48:10: error: 'pword' undeclared (first use in this function); did you mean 'pword2'?
48 | if(*(pword+1)!='\0')return strcom(pword+1,pword+1);
| ^~~~~
| pword2
main.c:48:10: note: each undeclared identifier is reported only once for each function... |
s325384456 | p04044 | C | #include<stdio.h>
void sort(int left,int right);
int strcom(char *pword1,char *pword2);
char *pstr[100];
int main(){
int N,L;
int i,j,k=0,len=0;
char str[101];
scanf("%d %d",&N &L);
char word[N*(L+1)];
*pstr[k++]=word[0];
for(i=0;i<N;i++){
scanf("%s",str);
j=0;
do{
word[len++]=str[j++];... | main.c: In function 'main':
main.c:10:20: error: invalid operands to binary & (have 'int *' and 'int')
10 | scanf("%d %d",&N &L);
| ~~ ^
| |
| int *
main.c: In function 'sort':
main.c:31:23: error: passing argument 2 of 'strcom' from incompatible po... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.