Submission #420374

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4203742021-06-08 10:15:28InternetPerson10Crossing (JOI21_crossing)C++17
100 / 100
1938 ms66672 KiB
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll MOD = 1000000007;
vector<int> nums[3];
vector<int> anss[9];
vector<int> tar;
vector<pair<pair<int, int>, int>> qs;
bool good[300001];
ll pow3[300001][4], sum3[300001][4];
ll ha[9][4];
vector<ll> ps = {1000000007, 1000000009, 1000000021, 1000000033};
vector<int> combine(vector<int> v1, vector<int> v2) {
vector<int> v;
v.resize(v1.size());
for(int i = 0; i < v.size(); i++) v[i] = (6 - v1[i] - v2[i])%3;
return v;
}
struct segTree {
ll prime; int typ;
vector<ll> nums, ops;
int size = 1;
void init(int n, ll p, int t) {
while(size < n) size *= 2;
vector<ll>().swap(nums);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'std::vector<int> combine(std::vector<int>, std::vector<int>)':
Main.cpp:20:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |  for(int i = 0; i < v.size(); i++) v[i] = (6 - v1[i] - v2[i])%3;
      |                 ~~^~~~~~~~~~
Main.cpp: In function 'int main()':
Main.cpp:135:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  135 |     if(j < anss[i].size()) k += anss[i][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...