Submission #1060968

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10609682024-08-16 05:05:5212345678Copy and Paste 3 (JOI22_copypaste3)C++17
62 / 100
741 ms836508 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
const ll nx=2505, mod=1e9+7, mul=31;
ll n, a, b, c, s[nx], dp[nx][nx], pw[nx];
string stmp;
struct update
{
ll l, r, cnta, cntc;
update(ll l=0, ll r=0, ll cnta=0, ll cntc=0): l(l), r(r), cnta(cnta), cntc(cntc){}
};
vector<update> calc[nx][nx];
int32_t main()
{
cin.tie(NULL)->sync_with_stdio(false);
cin>>n>>stmp>>a>>b>>c;
pw[0]=1;
for (int i=1; i<=n; i++) s[i]=stmp[i-1]-'a'+1, pw[i]=(pw[i-1]*mul)%mod;
for (int sz=1; sz<=n; sz++)
{
map<ll, vector<ll>> mp;
ll sm=0;
for (int i=1; i<=sz; i++) sm=(sm+pw[sz-i]*s[i])%mod;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

copypaste3.cpp: In function 'int32_t main()':
copypaste3.cpp:40:24: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   40 |                 if (pts!=v.size()) pa[i]=pts;
      |                     ~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...