Rezultati

Up. imeNalogaJezikRezultatČas oddaje
Aquasonic-2018 Podnapisi C++ 0/100Prekoračen čas (TLE) 10. maj '18 @ 18:26

Test Točke Porabljen spomin Porabljen čas Status
#1 0/7 1,988 MiB 0,000 s Prekoračen čas
#2 0/7 1,977 MiB 0,000 s Prekoračen čas
#3 0/7 1,980 MiB 0,000 s Prekoračen čas
#4 0/7 1,992 MiB 0,000 s Prekoračen čas
#5 0/7 1,992 MiB 0,000 s Prekoračen čas
#6 0/7 1,980 MiB 0,000 s Prekoračen čas
#7 0/7 1,980 MiB 0,000 s Prekoračen čas
#8 0/7 1,996 MiB 0,000 s Prekoračen čas
#9 0/7 1,988 MiB 0,000 s Prekoračen čas
#10 0/7 1,984 MiB 0,000 s Prekoračen čas
#11 0/7 1,992 MiB 0,000 s Prekoračen čas
#12 0/7 1,988 MiB 0,000 s Prekoračen čas
#13 0/8 1,992 MiB 0,000 s Prekoračen čas
#14 0/8 1,980 MiB 0,000 s Prekoračen čas

Ocenjevani program (main.cpp):
#include <bits/stdc++.h>

#define f first
#define s second
#define mp make_pair
#define pb push_back

#define left(x) ((x) << 1)
#define right(x) ((x) << 1 | 1)
#define mid(x, y) ((x) + (y) >> 1)

using namespace std;

const int maxn = 1 * 1e5 + 17;

int shtime, shms;
string line;

/**
SHIFT: 00:09:00,020
1
00:50:59,980 --> 00:59:00,000
In 2022, mankind finally

2
00:00:09,600 --> 00:00:11,590
built a full virtual environment
falsef falsef rqwrqw fafgqytqwtqw
rqopjrqwopjrqopwj tqtqwitqwo tqoutqw
eqieqw eipqwiepqw eqpwueqw
eiqwoeiqwopeqw eiqwpeiqwwieq

3
00:00:17,840 --> 00:00:21,270
All right, we're under way!
It's time for this week's MMO Stream.
**/

bool num(string x)
{
    for (char y : x)
        if (y < '0' || y > '9') return false;
    return true;
}

int main()
{
    ios_base::sync_with_stdio(false);

    getline(cin, line);

    int x = (line[7] - '0') * 10 + (line[8] - '0');
    int y = (line[10] - '0') * 10 + (line[11] - '0');
    int z = (line[13] - '0') * 10 + (line[14] - '0');
    int w = (line[16] - '0') * 100 + (line[17] - '0') * 10 + (line[18] - '0');

    shtime = z + y * 60 + x * 60 * 60;
    shms = w;

/// cout << shtime << " " << shms << endl;

    int k = 0;
    getline(cin, line);

    k = atoi(line.c_str());
    
    while (true) {
    /// if (!getline(cin, line)) break;

        cout << line << endl;
        getline(cin, line);

        int crtime, crms;

        x = (line[0] - '0') * 10 + (line[1] - '0');
        y = (line[3] - '0') * 10 + (line[4] - '0');
        z = (line[6] - '0') * 10 + (line[7] - '0');
        w = (line[9] - '0') * 100 + (line[10] - '0') * 10 + (line[11] - '0');

        crtime = z + y * 60 + x * 60 * 60;
        crms = w;

        crms += shms;
        crtime += shtime;

        crtime += crms / 1000;
        crms %= 1000;

        x = crtime / 3600;

        if (x < 10) printf("0%d:", x);
        else printf("%d:", x);

        crtime = (crtime - (crtime / 3600) * 3600);

        x = crtime / 60;

        if (x < 10) printf("0%d:", x);
        else printf("%d:", x);

        crtime = (crtime - (crtime / 60) * 60);

        x = crtime;
        if (x < 10) printf("0%d,", x);
        else printf("%d,", x);

        if (crms < 10) printf("00%d", crms);
        else if (crms < 100) printf("0%d", crms);
        else printf("%d", crms);

        printf(" --> ");

    /// printf("%d:%d:%d,%d --> ", crtime / 3600, crtime - (crtime / 3600) * 3600 / 60, (crtime / 3600) % 3600, crms);

        x = (line[17] - '0') * 10 + (line[18] - '0');
        y = (line[20] - '0') * 10 + (line[21] - '0');
        z = (line[23] - '0') * 10 + (line[24] - '0');
        w = (line[26] - '0') * 100 + (line[27] - '0') * 10 + (line[28] - '0');

        crtime = z + y * 60 + x * 60 * 60;
        crms = w;

        crms += shms;
        crtime += shtime;

        crtime += crms / 1000;
        crms %= 1000;

        x = crtime / 3600;

        if (x < 10) printf("0%d:", x);
        else printf("%d:", x);

        crtime = (crtime - (crtime / 3600) * 3600);

        x = crtime / 60;

        if (x < 10) printf("0%d:", x);
        else printf("%d:", x);

        crtime = (crtime - (crtime / 60) * 60);

        x = crtime;
        if (x < 10) printf("0%d,", x);
        else printf("%d,", x);

        if (crms < 10) printf("00%d", crms);
        else if (crms < 100) printf("0%d", crms);
        else printf("%d", crms);

        printf("\n");

        fflush(stdout);

    /// cout << crtime << " " << crms << endl;


    /// cout << endl << line << endl;
    /**
        getline(cin, line); cout << line << endl;
        getline(cin, line); cout << line << endl;
    **/

        while (true) {
            getline(cin, line);

            if (num(line)) {
                if (atoi(line.c_str()) == k + 1) {
                    k++;
                    break;
                }
            }

            cout << line << endl;
            fflush(stdout);
        }

    }

/// cout << x << " " << y << " " << z << " " << w << endl;

    return 0;
}