QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#741049#7534. KPI Calculationucup-team2172#AC ✓1ms3728kbC++23781b2024-11-13 13:08:472024-11-13 13:08:48

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3652kb

input:

#include <cstdio>

int main()
{
 int a,b;
  scanf ("%d%d",&a,&b);
   printf ("%d\n",a+b);
    return 0;
}


output:

10

result:

ok answer is '10'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:



          a


 b




output:

11

result:

ok answer is '11'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:











output:

0

result:

ok answer is '0'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:



output:

0

result:

ok answer is '0'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3728kb

input:

                                                                                                                                                                                                                                                                                                            ...

output:

93183

result:

ok answer is '93183'

Test #6:

score: 0
Accepted
time: 1ms
memory: 3664kb

input:

                                                                                                                                                                                                                                                                                                            ...

output:

1260

result:

ok answer is '1260'

Test #7:

score: 0
Accepted
time: 1ms
memory: 3676kb

input:

                                                                                                                                                                                                                                                                                                            ...

output:

88843

result:

ok answer is '88843'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

///#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
///#pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,popcnt,avx,avx2,tune=native")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>

/*
    zet:
  ...

output:

356

result:

ok answer is '356'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,k,c;
    cin>>n>>k>>c;
    vector<vector<int> >x(k+1),y(k+1);
    vector<int>last(n);
    for(int i=0;i<c;i++){
        int z,f,c;
        cin>>z>>f>>c;
        x[c].push_back(z-1);
        y[c].push_back(f-1);
        last[z-1]=max...

output:

409

result:

ok answer is '409'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3524kb

input:

#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define i2 array<int,2>
using namespace std;
const int N = 1010;
const int D = 13;
vector<int> g[N][D];
int n, k, c, mx_d[N];
int tim = 0, dp[D][N];
bool bad[N];

int main() {
    ios_base::sync_with_stdio(0); ci...

output:

352

result:

ok answer is '352'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

// Author:  HolyK
// Created: Thu Aug 25 17:32:06 2022
#include <bits/stdc++.h>

template <class T, class U>
inline bool smin(T &x, const U &y) {
  return y < x ? x = y, 1 : 0;
}
template <class T, class U>
inline bool smax(T &x, const U &y) {
  return x < y ? x = y, 1 : 0;
}

using LL = long long;
...

output:

184

result:

ok answer is '184'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

// Author:  HolyK
// Created: Thu Aug 25 17:32:06 2022
#include <bits/stdc++.h>

template <class T, class U>
inline bool smin(T &x, const U &y) {
  return y < x ? x = y, 1 : 0;
}
template <class T, class U>
inline bool smax(T &x, const U &y) {
  return x < y ? x = y, 1 : 0;
}

using ULL = unsigned l...

output:

140

result:

ok answer is '140'

Test #13:

score: 0
Accepted
time: 1ms
memory: 3484kb

input:

// Author:  HolyK
// Created: Thu Aug 25 17:32:06 2022
#include <bits/stdc++.h>

template <class T, class U>
inline bool smin(T &x, const U &y) {
  return y < x ? x = y, 1 : 0;
}
template <class T, class U>
inline bool smax(T &x, const U &y) {
  return x < y ? x = y, 1 : 0;
}

using ULL = unsigned l...

output:

90

result:

ok answer is '90'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

//I wrote this code 4 u today
#include <bits/stdc++.h>

#define vc vector

#define nd node*
#define pnd pair<nd, nd>

using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef vc<pll> vpll;
typedef vc<vll> vvll;
typedef vc<vpll> vvpll;

template<const ll MO...

output:

180

result:

ok answer is '180'

Test #15:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

//I wrote this code 4 u today
#include <bits/stdc++.h>

#define vc vector

#define nd node*
#define pnd pair<nd, nd>

using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef vc<pll> vpll;
typedef vc<vll> vvll;
typedef vc<vpll> vvpll;

template<const ll MO...

output:

180

result:

ok answer is '180'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3484kb

input:

//I wrote this code 4 u today
#include <bits/stdc++.h>

#define vc vector

#define nd node*
#define pnd pair<nd, nd>

using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef vc<pll> vpll;
typedef vc<vll> vvll;
typedef vc<vpll> vvpll;

template<const ll MO...

output:

252

result:

ok answer is '252'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

#include <bits/stdc++.h>
using namespace std;

const int N = 1e3 + 5;
const int D = 11;

vector<int> g[D][N];

int main() {

  int n, k, c, a, b, d;
  cin >> n >> k >> c;
  vector<int> last(n, 0);

  while(c--){
    cin >> a >> b >> d;
    a--, b--;
    last[a] = max(last[a], d);
    last[b] = max(l...

output:

148

result:

ok answer is '148'

Test #18:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

#include <bits/stdc++.h>
using namespace std;

const int N = 1e3 + 5;
const int D = 11;

vector<int> g[D][N];

int main() {

  int n, k, c, a, b, d;
  cin >> n >> k >> c;
  vector<int> last(n, 0);

  while(c--){
    cin >> a >> b >> d;
    a--, b--;
    last[a] = max(last[a], d);
    last[b] = max(l...

output:

146

result:

ok answer is '146'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

#include <bits/stdc++.h>

using namespace std;

const int K = 12;
const int N = 1005;

bool okay;
int n, k, m;
vector <int> g[K][N];
bitset <N> vis, can[K];

void go (int u, int day) {
  if (!can[day][u]) return;
  if (!day) okay = true;
  if (okay) return;
  vis[u] = 1;
  for (int v : g[day][u]) if...

output:

76

result:

ok answer is '76'

Test #20:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

#include <bits/stdc++.h>

#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()

using namespace std;

typedef long long ll;

const int MAXN = (int) 1e3 + 5;
const int MAXK = 15;

vector<int> adj[MAXN][MAXK];
array<int, 3> e[MAXN];
int lst[MAXN];
int n, k, m;

bool dp[MAXN][MAXK];

int...

output:

264

result:

ok answer is '264'

Test #21:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

#include<bits/stdc++.h>
using namespace std;
// Pragma
#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline","03")
// Macros:
#define f first
#define s second
typedef long double ld;
typedef long long ll;
// debugging macros
#define db(x) cerr << #x << ": " << (x) << '\n';
#defin...

output:

340

result:

ok answer is '340'

Test #22:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define all(arr) (arr).begin(), (arr).end()
#define ll long long
#define ld long double
#define pb push_back
#define sz(x) int((x).size())
#define fi first
#define se second
#define endl '\n'

signed main(){
  ios_base::sync_wi...

output:

96

result:

ok answer is '96'

Test #23:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define all(arr) (arr).begin(), (arr).end()
#define ll long long
#define ld long double
#define pb push_back
#define sz(x) int((x).size())
#define fi first
#define se second
#define endl '\n'

signed main(){
  ios_base::sync_wi...

output:

96

result:

ok answer is '96'

Test #24:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
//#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, k, c;
const int maxN = 1005;
int last[maxN];
vector<pair<int,int>> g[maxN];
bool used[maxN];
bool good[maxN];
void dfs(int v) {
  ...

output:

316

result:

ok answer is '316'

Test #25:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
//#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, k, c;
const int maxN = 1005;
int last[maxN];
vector<pair<int,int>> g[maxN];
bool used[maxN];
bool good[maxN];
void dfs(int v) {
  ...

output:

356

result:

ok answer is '356'

Test #26:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>


using namespace std;


using ll = long long;
using ld = long double;

#define X first
#define Y second

const ll mod = 1000000007;
//const ll mod = 998244353;

vector<pair<ll,ll>> x;
ll m, n;

bool cmp(pair<ll,ll> a, pair<ll,ll> b)
{
    ll Fa...

output:

532

result:

ok answer is '532'

Test #27:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>


using namespace std;


using ll = long long;
using ld = long double;

#define X first
#define Y second

const ll mod = 1000000007;
//const ll mod = 998244353;

vector<pair<ll,ll>> x;
ll m, n;

bool cmp(pair<ll,ll> a, pair<ll,ll> b)
{
    ll Fa...

output:

680

result:

ok answer is '680'

Test #28:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>


using namespace std;


using ll = long long;
using ld = long double;

#define X first
#define Y second

const ll mod = 1000000007;
//const ll mod = 998244353;

vector<pair<ll,ll>> x;
ll m, n;

bool cmp(pair<ll,ll> a, pair<ll,ll> b)
{
    ll Fa...

output:

692

result:

ok answer is '692'

Test #29:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
//#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, k, c;
const int maxN = 1005;
int last[maxN];
vector<pair<int,int>> g[maxN];
bool used[maxN];
bool good[maxN];
void dfs(int v) {
  ...

output:

712

result:

ok answer is '712'

Test #30:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
//#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, k, c;
const int maxN = 1005;
int last[maxN];
vector<pair<int,int>> g[maxN];
bool used[maxN];
bool good[maxN];
void dfs(int v) {
  ...

output:

712

result:

ok answer is '712'

Test #31:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

//#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, k, c;
const int maxN = 1005;
int last[maxN];
vector<pair<int,int>> g[maxN];
bool used[maxN];
bool good[maxN];
void dfs(int v) {
    used[v] = true;
    for (auto& it : g[v])...

output:

356

result:

ok answer is '356'

Test #32:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define pbc push_back
#define pob pop_back()
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define vin(a) for (auto& i : a) cin >> i

// mt19937 rnd(chrono::ste...

output:

394

result:

ok answer is '394'

Test #33:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

x = 0 y = 0 a[x][y] = v
x = 0 y = 1 a[x][y] = <
x = 0 y = 0 a[x][y] = v
x = 0 y = 2 a[x][y] = <
x = 0 y = 1 a[x][y] = <
x = 0 y = 0 a[x][y] = v
x = 0 y = 3 a[x][y] = <
x = 0 y = 2 a[x][y] = <
x = 0 y = 1 a[x][y] = <
x = 0 y = 0 a[x][y] = v
x = 0 y = 5 a[x][y] = v
x = 1 y = 0 a[x][y] = v
x = 1 y = 2 ...

output:

0

result:

ok answer is '0'

Test #34:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define pbc push_back
#define pob pop_back()
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define vin(a) for (auto& i : a) cin >> i

// mt19937 rnd(chrono::ste...

output:

1280

result:

ok answer is '1280'

Test #35:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

x = 0 y = 0 a[x][y] = v
x = 1 y = 0 a[x][y] = v
x = 2 y = 0 a[x][y] = >
x = 2 y = 1 a[x][y] = >
x = 2 y = 2 a[x][y] = v
x = 3 y = 2 a[x][y] = v
x = 4 y = 2 a[x][y] = <
x = 4 y = 1 a[x][y] = <
x = 0 y = 1 a[x][y] = <
x = 0 y = 2 a[x][y] = <
x = 0 y = 3 a[x][y] = <
x = 0 y = 5 a[x][y] = v
x = 1 y = 5 ...

output:

0

result:

ok answer is '0'

Test #36:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define pbc push_back
#define pob pop_back()
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define vin(a) for (auto& i : a) cin >> i

// mt19937 rnd(chrono::ste...

output:

1280

result:

ok answer is '1280'

Test #37:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define pbc push_back
#define pob pop_back()
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define vin(a)        \
    for (auto& i : a) \
    cin >> i

// mt19...

output:

1274

result:

ok answer is '1274'

Test #38:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define pbc push_back
#define pob pop_back()
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define vin(a) for (auto& i : a) cin >> i

// mt19937 rnd(chrono::ste...

output:

394

result:

ok answer is '394'

Test #39:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("sse4.2")

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define ll long long
#define pt pair<int, int>
#define x first
#define y second

const int mod = 998244353;

struct kek {
    int a, b, d;
};

bool operator<...

output:

236

result:

ok answer is '236'

Test #40:

score: 0
Accepted
time: 1ms
memory: 3532kb

input:

#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("sse4.2")

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define ll long long
#define pt pair<int, int>
#define x first
#define y second

const int mod = 998244353;

struct kek {
    int a, b, d;
};

bool operator<...

output:

236

result:

ok answer is '236'

Test #41:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("sse4.2")

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define ll long long
#define pt pair<int, int>
#define x first
#define y second

const int mod = 998244353;

struct kek {
    int a, b, d;
};

bool operator<...

output:

280

result:

ok answer is '280'

Test #42:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define fr first
#define sc second
#define m_p make_pair
#define low_bo(a, x) ((int)(lower_bound(a.begin(), a.end(), x) - a.begin()))
#define up_bo(a, x) ((int)(upper_bound(a.begin(), a.end(), x) - a.begin()))
#define unique(a) a.resize(...

output:

372

result:

ok answer is '372'

Test #43:

score: 0
Accepted
time: 0ms
memory: 3420kb

input:

#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define fr first
#define sc second
#define m_p make_pair
#define low_bo(a, x) ((int)(lower_bound(a.begin(), a.end(), x) - a.begin()))
#define up_bo(a, x) ((int)(upper_bound(a.begin(), a.end(), x) - a.begin()))
#define unique(a) a.resize(...

output:

944

result:

ok answer is '944'

Test #44:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <numeric>
#define pb emplace_back
#define sz(x) (int)x.size()
#define ll int64_t
#define all(x) x.begin(), x.end()
#define pii pair<in...

output:

364

result:

ok answer is '364'

Test #45:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <numeric>
#define pb emplace_back
#define sz(x) (int)x.size()
#define ll int64_t
#define all(x) x.begin(), x.end()
#define pii pair<in...

output:

364

result:

ok answer is '364'

Test #46:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <numeric>
#define pb emplace_back
#define sz(x) (int)x.size()
#define ll int64_t
#define all(x) x.begin(), x.end()
#define pii pair<in...

output:

236

result:

ok answer is '236'

Test #47:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <numeric>
#define pb emplace_back
#define sz(x) (int)x.size()
#define ll int64_t
#define all(x) x.begin(), x.end()
#define pii pair<in...

output:

244

result:

ok answer is '244'

Test #48:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

#include <iostream>
#include <iomanip>
#include <ostream>
#include <istream>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <bitset>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <array>
#include <algorithm>
...

output:

428

result:

ok answer is '428'

Test #49:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

#include <bits/stdc++.h>

using namespace std;

int n, k, c;
vector<int> g[11][1001];
set<int> used, used_ill;

void dfs_block(int v, int d) {
    if (d == 0)
        return;

    for (int i = 0; i <= d; ++i)
        used.insert(i * n + v);

    for (int u : g[d][v]) {
        if (!used.count((d - 1...

output:

324

result:

ok answer is '324'

Test #50:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

#include <bits/stdc++.h>

using namespace std;

int n, k, c;
vector<int> g[11][1001];
vector<int> ld;

bool dfs_block(int v, int d) {
    if (d == 0)
        return true;

    for (int u : g[d][v]) {
        if (ld[u] == d && dfs_block(u, d - 1)) {
            return true;
        }
    }

    retur...

output:

208

result:

ok answer is '208'

Test #51:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

#include "bits/stdc++.h"

using namespace std;

const int N = 1010;
const int mod = 998244353;

int n, k, m;
vector<int> v[N][11];
int z[N][11];
int last[N];
bool bad[N];

void solve(int i0)
{
    for (int i = 0; i < N; i++) {
        for (int j = 0; j <= k; j++) {
            z[i][j] = 0;
        }...

output:

332

result:

ok answer is '332'

Test #52:

score: 0
Accepted
time: 0ms
memory: 3476kb

input:

#include "bits/stdc++.h"

using namespace std;

const int N = 1010;
const int mod = 998244353;

int n, k, m;
vector<int> v[N][11];
int z[N][11];
int last[N];
bool bad[N];

void solve(int i0)
{
    for (int i = 0; i < N; i++) {
        for (int j = 0; j <= k; j++) {
            z[i][j] = 0;
        }...

output:

340

result:

ok answer is '340'

Test #53:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

#include<bits/stdc++.h>
using namespace std;
struct vs
{
 int a, b, d;
};
bool comp(vs a, vs b)
{
 return a.d < b.d;
}
int main()
{
 int n, k, c;
 cin >> n >> k >> c;
 vector<vs>v(c);
 for (int i = 0; i < c; i++)
  cin >> v[i].a >> v[i].b >> v[i].d;
 sort(v.begin(), v.end(), comp);
 vector<bool>star...

output:

159

result:

ok answer is '159'

Test #54:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

#include<bits/stdc++.h>
using namespace std;
struct vs
{
 int a, b, d;
};
bool comp(vs a, vs b)
{
 return a.d < b.d;
}
int main()
{
 int n, k, c;
 cin >> n >> k >> c;
 vector<vs>v(c);
 for (int i = 0; i < c; i++)
  cin >> v[i].a >> v[i].b >> v[i].d;
 sort(v.begin(), v.end(), comp);
 vector<bool>star...

output:

169

result:

ok answer is '169'

Test #55:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:


# include <bits/stdc++.h>

# include <ext/pb_ds/assoc_container.hpp>
# include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

template<typename T> using ordered_set = tree <T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define _USE_MATH_DEF...

output:

268

result:

ok answer is '268'

Test #56:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:


# include <bits/stdc++.h>

# include <ext/pb_ds/assoc_container.hpp>
# include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

template<typename T> using ordered_set = tree <T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define _USE_MATH_DEF...

output:

284

result:

ok answer is '284'

Test #57:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

n, k, c = [int(x) for x in input().split()]
X = [set() for i in range(k + 1)]
L = [set() for i in range(k + 1)]
C = [set() for i in range(k + 1)]
people = []
people_day = [[] for i in range(k)]
for i in range(c):
    x = tuple([int(j) for j in input().split()])
    people.append(x)
    C[x[2] - 1].a...

output:

112

result:

ok answer is '112'

Test #58:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

n, k, c = [int(x) for x in input().split()]
X = [set() for i in range(k + 1)]
L = [set() for i in range(k + 1)]
C = [set() for i in range(k + 1)]
D = [set() for i in range(k + 1)]
people = []
people_day = [[] for i in range(k)]
for i in range(c):
    x = tuple([int(j) for j in input().split()])
    ...

output:

160

result:

ok answer is '160'

Test #59:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

n, k, c = [int(x) for x in input().split()]
X = [set() for i in range(k + 1)]
L = [set() for i in range(k + 1)]
C = [set() for i in range(k + 1)]
D = [set() for i in range(k + 1)]
people = []
people_day = [[] for i in range(k)]
for i in range(c):
    x = tuple([int(j) for j in input().split()])
    ...

output:

160

result:

ok answer is '160'

Test #60:

score: 0
Accepted
time: 0ms
memory: 3468kb

input:

n, k, c = [int(x) for x in input().split()]
X = [set() for i in range(k + 1)]
L = [set() for i in range(k + 1)]
C = [set() for i in range(k + 1)]
D = [set() for i in range(k + 1)]
people = []
people_day = [[] for i in range(k)]
for i in range(c):
    x = tuple([int(j) for j in input().split()])
    ...

output:

172

result:

ok answer is '172'

Test #61:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

/*
    @author Dmitriy S
*/

#include <bits/stdc++.h>
using namespace std;

#define fast_io         {ios::sync_with_stdio(0); cin.tie(0);}
#define all(v)          v.begin(),v.end()
#define pb              push_back
#define popb            pop_back
#define F               first
#define S             ...

output:

612

result:

ok answer is '612'

Test #62:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

/*
    @author Dmitriy S
*/

#include <bits/stdc++.h>
using namespace std;

#define fast_io         {ios::sync_with_stdio(0); cin.tie(0);}
#define all(v)          v.begin(),v.end()
#define pb              push_back
#define popb            pop_back
#define F               first
#define S             ...

output:

612

result:

ok answer is '612'

Test #63:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class A1 {
 FastScanner in;
 PrintWriter out;
 boolean systemIO = true;


 public void solve() {
  int n = in.nextInt();
  int k = in.nextInt();
  int c = in.nextInt();
  int[] last = new int[n];
  boolean[][] ill = new boole...

output:

300

result:

ok answer is '300'

Test #64:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

import java.io.*;
import java.util.*;

public class C1int {
 FastScanner in;
 PrintWriter out;
 boolean systemIO = true;

 public class Point implements Comparable<Point> {
  int x;
  int y;

  public Point(int x, int y) {
   this.x = x;
   this.y = y;
  }

  public Point mult(int a) {
   return new...

output:

572

result:

ok answer is '572'

Test #65:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

import java.io.*;
import java.util.*;

public class H1 {
 FastScanner in;
 PrintWriter out;
 boolean systemIO = true;

 public boolean solve2(int n) {
  int na = 0;
  int nb = 0;
  for (int i = 0; i < n; i++) {
   if (in.next().equals("A")) {
    na++;
   } else {
    nb++;
   }
   in.next();
  }
  ...

output:

549

result:

ok answer is '549'

Test #66:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

import java.io.*;
import java.util.*;

public class H1 {
 FastScanner in;
 PrintWriter out;
 boolean systemIO = true;

 public boolean solve2(int n) {
  int na = 0;
  int nb = 0;
  for (int i = 0; i < n; i++) {
   if (in.next().equals("A")) {
    na++;
   } else {
    nb++;
   }
   in.next();
  }
  ...

output:

549

result:

ok answer is '549'

Test #67:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class M {
    static BufferedReader br;
    static StringTokenizer st;
    static PrintWriter pw;

    static String nextToken() {
      ...

output:

424

result:

ok answer is '424'

Test #68:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class M1 {
 FastScanner in;
 PrintWriter out;
 boolean systemIO = true;

 int ALPHA = 26;

 public String toString(int[] a) {
  String res = "";
  for (int i = 0; i < a.length; i++) {
   res += (char) ('a' + a[i]);
  }
  retu...

output:

446

result:

ok answer is '446'

Test #69:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class M1 {
 FastScanner in;
 PrintWriter out;
 boolean systemIO = true;

 int ALPHA = 26;

 public String toString(int[] a) {
  String res = "";
  for (int i = 0; i < a.length; i++) {
   res += (char) ('a' + a[i]);
  }
  retu...

output:

444

result:

ok answer is '444'