Submission #230913

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2309132020-05-12 00:34:08arnold518Selling RNA Strands (JOI16_selling_rna)C++14
0 / 100
244 ms158584 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2e6;
char T[MAXN+10];
int N, M;
vector<int> A[MAXN+10];
int X[MAXN+10], Y[MAXN+10];
struct Node
{
int L, R;
Node *chd[4];
Node() : L(MAXN*2), R(0)
{
chd[0]=NULL; chd[1]=NULL; chd[2]=NULL; chd[3]=NULL;
}
};
void update(Node *node, vector<int> &V, int it)
{
if(it==V.size()) return;
if(node->chd[V[it]]==NULL) node->chd[V[it]]=new Node();
update(node->chd[V[it]], V, it+1);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

selling_rna.cpp: In function 'void update(Node*, std::vector<int>&, int)':
selling_rna.cpp:28:7: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(it==V.size()) return;
     ~~^~~~~~~~~~
selling_rna.cpp: In function 'void dfs(Node*)':
selling_rna.cpp:36:9: warning: unused variable 'j' [-Wunused-variable]
  int i, j;
         ^
selling_rna.cpp: In function 'pii query(Node*, std::vector<int>&, int)':
selling_rna.cpp:51:7: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(it==V.size()) return {node->L, node->R};
     ~~^~~~~~~~~~
selling_rna.cpp: In function 'int main()':
selling_rna.cpp:153:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(; j<PV.size() && PV[j].first==i; j++) bit.update(PV[j].second);
         ~^~~~~~~~~~
selling_rna.cpp:154:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(; k<DV.size() && DV[k].x==i; k++)
         ~^~~~~~~~~~
selling_rna.cpp:80:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d", &N, &M);
  ~~~~~^~~~~~~~~~~~~~~~
selling_rna.cpp:86:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s", T);
   ~~~~~^~~~~~~~~
selling_rna.cpp:124:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s", T);
   ~~~~~^~~~~~~~~
selling_rna.cpp:133:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s", T);
   ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...