Submission #332701

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3327012020-12-03 03:41:308e7Selling RNA Strands (JOI16_selling_rna)C++14
100 / 100
293 ms198508 KiB
//Challenge: Accepted
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#define ll long long
#define ff first
#define ss second
#define maxn 100005
#define mod 1000000007
#define zckorz ios_base::sync_with_stdio(0);cin.tie(0);
using namespace std;
int n, m;
int cor[maxn], arr[maxn], ans[maxn];
struct node {
char c;
int cnt = 0, l, r;
node * chi[4];
vector<int> v;
node(char ch) {
c = ch, cnt = 0, l = 0, r = 0;
for (int i = 0;i < 4;i++) chi[i] = NULL;
}
node() {
c = ' ', cnt = 0, l = 0, r = 0;
for (int i = 0;i < 4;i++) chi[i] = NULL;
}
};
void add(node * cur, string &s, int ind, int x) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

selling_rna.cpp: In function 'void add(node*, std::string&, int, int)':
selling_rna.cpp:32:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   32 |  if (ind == s.size() - 1) {
      |      ~~~~^~~~~~~~~~~~~~~
selling_rna.cpp: In function 'std::pair<int, int> range(node*, std::string&, int)':
selling_rna.cpp:83:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   83 |  if (ind == s.size() - 1) {
      |      ~~~~^~~~~~~~~~~~~~~
selling_rna.cpp: In function 'int main()':
selling_rna.cpp:122:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  122 |   for (int j = 0;j < s.size();j++) s[j] = (s[j] == 'G' ? 'B' : (s[j] == 'U' ? 'D' : s[j]));
      |                  ~~^~~~~~~~~~
selling_rna.cpp:137:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  137 |   for (int j = 0;j < p.size();j++) p[j] = (p[j] == 'G' ? 'B' : (p[j] == 'U' ? 'D' : p[j]));
      |                  ~~^~~~~~~~~~
selling_rna.cpp:138:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  138 |   for (int j = 0;j < q.size();j++) q[j] = (q[j] == 'G' ? 'B' : (q[j] == 'U' ? 'D' : q[j]));
      |                  ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...