QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#518200 | #8644. Tricolor Lights | green_gold_dog# | Compile Error | / | / | C++20 | 1.1kb | 2024-08-13 18:01:00 | 2024-08-13 18:01:00 |
Judging History
This is the latest submission verdict.
- [2024-08-13 18:01:00]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-08-13 18:01:00]
- Submitted
Anna
#include "Anna.h"
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
mt19937 rnd(228);
const ll len = 130;
char to(ll x) {
if (x == 0) {
return 'R';
}
if (x == 1) {
return 'G';
}
if (x == 2) {
return 'B';
}
}
pair<string, ll> anna(ll n, string s) {
string ans(n);
vector<ll> nums(n);
for (ll i = 0; i < n; i++) {
nums[i] = rnd() % 3;
}
for (ll i = 0; i < n; i++) {
set<char> all;
all.insert('R');
all.insert('G');
all.insert('B');
all.erase(s[i]);
all.erase(to(nums[i]));
vector<char> a;
for (auto i : all) {
a.push_back(i);
}
ans[i] = a[rnd() % a.size()];
}
return make_pair(ans, len);
}
Bruno
#include "Bruno.h"
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
mt19937 rnd(228);
const ll len = 130;
char to(ll x) {
if (x == 0) {
return 'R';
}
if (x == 1) {
return 'G';
}
if (x == 2) {
return 'B';
}
}
vector<ll> arr;
void init(ll n, ll l) {
arr.resize(n);
while (true) {
arr[0] = rnd() % 3;
}
}
ll bruno(string u) {
}
Details
Anna.code: In function ‘std::pair<std::__cxx11::basic_string<char>, int> anna(ll, std::string)’: Anna.code:25:21: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(ll&)’ 25 | string ans(n); | ^ In file included from /usr/include/c++/11/string:55, from Anna.h:1, from Anna.code:1: /usr/include/c++/11/bits/basic_string.h:664:9: note: candidate: ‘template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with _Tp = _Tp; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 664 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/11/bits/basic_string.h:664:9: note: template argument deduction/substitution failed: In file included from /usr/include/c++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from Anna.h:1, from Anna.code:1: /usr/include/c++/11/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]’: /usr/include/c++/11/bits/basic_string.h:125:8: required by substitution of ‘template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using _If_sv = std::enable_if_t<std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value, _Res> [with _Tp = int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ /usr/include/c++/11/bits/basic_string.h:662:30: required from here /usr/include/c++/11/type_traits:2579:11: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ 2579 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~~~~~~~~~ In file included from /usr/include/c++/11/string:55, from Anna.h:1, from Anna.code:1: /usr/include/c++/11/bits/basic_string.h:653:9: note: candidate: ‘template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _Tp = _Tp; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 653 | basic_string(const _Tp& __t, size_type __pos, size_type __n, | ^~~~~~~~~~~~ /usr/include/c++/11/bits/basic_string.h:653:9: note: template argument deduction/substitution failed: Anna.code:25:21: note: candidate expects 4 arguments, 1 provided 25 | string ans(n); | ^ In file included from /usr/include/c++/11/string:55, from Anna.h:1, from Anna.code:1: /usr/include/c++/11/bits/basic_string.h:638:9: note: candidate: ‘template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 638 | basic_string(_InputIterator __beg, _InputIterator __end, | ^~~~~~~~~~~~ /usr/include/c++/11/bits/basic_string.h:638:9: note: template argument deduction/substitution failed: Anna.code:25:21: note: candidate expects 3 arguments, 1 provided 25 | string ans(n); | ^ In file included from /usr/include/c++/11/string:55, from Anna.h:1, from Anna.code:1: /usr/include/c++/11/bits/basic_string.h:553:7: note: candidate: ‘template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT, const _Alloc&) [with <template-parameter-2-1> = <template-parameter-1-1>; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ 553 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) | ^~~~~~~~~~~~ /usr/include/c++/11/bits/basic_string.h:553:7: note: template argument deduction/substitution failed: Anna.code:25:21: note: candidate expects 3 arguments, 1 provided 25 | string ans(n); | ^ In file included from /usr/include/c++/11/string:55, ...