Submission #298216

# Submission time Handle Problem Language Result Execution time Memory
298216 2020-09-12T15:02:36 Z toloraia Shopping Plans (CCO20_day2problem3) C++14
0 / 25
11 ms 14464 KB
#include <bits/stdc++.h>
#define F first
#define S second
#define mp make_pair
#define pb push_back
//#define ll __int128
#define ll long long
#define int long long
#define LEFT(a) ((a)<<1)
#define RIGHT(a) (LEFT(a) + 1)
#define MID(a,b) ((a+b)>>1)
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define y1 y122
/*
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
/*
#pragma GCC optimize ("O3")
#pragma GCC optimize("Ofast")

#pragma GCC target("avx2,fma")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC target ("avx2")
#pragma GCC optimization ("unroll-loops")

#pragma comment(linker, "/STACK: 20000000005")
*/

using namespace std;

int X, k;

vector < int > solve (vector < int > V, int l, int r, int ms){
}

const int N = 200005, INF = 1e14;

int n, m;

vector < int > V[N], A[N];
int l[N], r[N], sum[N];

pair < int, int > P[N];

vector < pair < int, vector < pair < int, int > > > > mas[N];

bool check () {
    /*int ss = 0;
    for (int i = 1; i <= m; i++){
        A[i] = solve (V[i], l[i], r[i], sum[i]);
        ss += (int)A[i].size() - 1;
        if (ss >= k-1)
            return 1;
        P[i].S = i;
        if ((int)A[i].size() > 1)
            P[i].F = A[i][1];
        else
            P[i].F = INF+1;
    }
    sort (P+1, P+m+1);
    for (int i = 0; i <= m; i++)
        mas[i].clear();
    vector < int > ans;
    ans.pb (0);
    mas[0].pb ({0, ans});
*/
}

main()
{
    //freopen ("in.in", "r", stdin);freopen ("out.out", "w", stdout);
    ios_base::sync_with_stdio(0);
    cin >> n >> m >> k;/*
    for (int i = 1; i <= n; i++){
        int col, c;
        cin >> col >> c;
        V[col].pb (c);
    }
    for (int i = 1; i <= m; i++){
        cin >> l[i] >> r[i];
        sort (V[i].begin(), V[i].end());
        if ((int)V[i].size() < l[i]){
            while (k--)
                cout << -1 << endl;
            return 0;
        }
        for (int j = 0; j < l[i]; j++)
            sum[i] += V[i][j];
        sum[0] += sum[i];
    }
    int L = 0, R = INF+1;
    while (L < R){
        X = L + R >> 1;
        if (check ())
            R = X;
        else
            L = X+1;
    }*/
    cout << n+m+k << endl;

}

Compilation message

Main.cpp:19:1: warning: "/*" within comment [-Wcomment]
   19 | /*
      |  
Main.cpp: In function 'std::vector<long long int> solve(std::vector<long long int>, long long int, long long int, long long int)':
Main.cpp:36:1: warning: no return statement in function returning non-void [-Wreturn-type]
   36 | }
      | ^
Main.cpp: In function 'bool check()':
Main.cpp:69:1: warning: no return statement in function returning non-void [-Wreturn-type]
   69 | }
      | ^
Main.cpp: At global scope:
Main.cpp:71:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   71 | main()
      |      ^
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 14464 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 14464 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 14464 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 14464 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 14464 KB Output isn't correct
2 Halted 0 ms 0 KB -