Submission #423384

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4233842021-06-11 04:47:02benedict0724Crossing (JOI21_crossing)C++17
26 / 100
333 ms12172 KiB
#include <iostream>
using namespace std;
int tree[800002], a[800002], b[800002], c[800002], lazy[800002];
int n, q;
string s1, s2, s3, t;
void propagate(int i, int l, int r)
{
if(lazy[i] == 0) return;
if(lazy[i] == 1 && b[i] == 0 && c[i] == 0) tree[i] = 1;
else if(lazy[i] == 2 && a[i] == 0 && c[i] == 0) tree[i] = 1;
else if(lazy[i] == 3 && a[i] == 0 && b[i] == 0) tree[i] = 1;
else tree[i] = 0;
if(l != r)
{
lazy[i*2] = lazy[i];
lazy[i*2+1] = lazy[i];
}
lazy[i] = 0;
}
void init(int i, int l, int r)
{
if(l == r)
{
if(s1[l] == 'J') a[i] = 1;
if(s1[l] == 'O') b[i] = 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:76:15: warning: 'ch' may be used uninitialized in this function [-Wmaybe-uninitialized]
   76 |         update(1, 0, n-1, l-1, r-1, ch);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...