Submission #971157

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9711572024-04-28 05:13:53huutuan한자 끝말잇기 (JOI14_kanji)C++14
100 / 100
139 ms19060 KiB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;
#define int long long
static const int N=310;
static int f1[N][N], f2[N][N];
static const int inf=0x3f3f3f3f3f3f3f3f;
static int mask[60];
static mt19937 rng(69420);
void Anna(int32_t n, int32_t m, int32_t a[], int32_t b[], int c[], int32_t q, int32_t s[], int32_t t[], int32_t _k, int32_t u[]) {
memset(f1, 0x3f, sizeof f1);
memset(f2, 0x3f, sizeof f2);
for (int i=0; i<m; ++i){
f1[a[i]][b[i]]=c[i];
f2[a[i]][b[i]]=c[i];
}
for (int i=0; i<_k; ++i){
f2[a[u[i]]][b[u[i]]]=inf;
}
for (int i=0; i<n; ++i) f2[i][i]=0;
for (int k=0; k<n; ++k){
for (int i=0; i<n; ++i){
for (int j=0; j<n; ++j){
f1[i][j]=min(f1[i][j], f1[i][k]+f1[k][j]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Anna.cpp: In function 'void Anna(int32_t, int32_t, int32_t*, int32_t*, long long int*, int32_t, int32_t*, int32_t*, int32_t, int32_t*)':
Anna.cpp:80:16: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   80 |       while (id!=v.size() && v[id].first<=diff) ++id;
      |              ~~^~~~~~~~~~
#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...