Submission #96613

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
966132019-02-10 12:59:11FutymyCloneTitlovi (COCI19_titlovi)C++14
50 / 50
2 ms376 KiB
#include <bits/stdc++.h>
using namespace std;
struct Box {
int id, hours, minutes, seconds, ms, houre, minutee, seconde, me;
vector <string> vec;
Box (int id = 0, int hours = 0, int minutes = 0, int seconds = 0, int ms = 0,
int houre = 0, int minutee = 0, int seconde = 0, int me = 0,
vector <string> vec = {}): id(id), hours(hours), minutes(minutes), seconds(seconds), ms(ms), houre(houre),
minutee(minutee), seconde(seconde), me(me), vec(vec) {}
};
int T;
bool canDo = true;
vector <Box> boxes;
void display (Box box) {
cout << box.id << "\n";
if (box.hours < 10) cout << "0"; cout << box.hours << ":";
if (box.minutes < 10) cout << "0"; cout << box.minutes << ":";
if (box.seconds < 10) cout << "0"; cout << box.seconds << ",";
if (box.ms < 10) cout << "00";
else if (box.ms < 100) cout << "0";
cout << box.ms;
cout << " --> ";
if (box.houre < 10) cout << "0"; cout << box.houre << ":";
if (box.minutee < 10) cout << "0"; cout << box.minutee << ":";
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

titlovi.cpp: In function 'void display(Box)':
titlovi.cpp:21:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (box.hours < 10) cout << "0"; cout << box.hours << ":";
     ^~
titlovi.cpp:21:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     if (box.hours < 10) cout << "0"; cout << box.hours << ":";
                                      ^~~~
titlovi.cpp:22:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (box.minutes < 10) cout << "0"; cout << box.minutes << ":";
     ^~
titlovi.cpp:22:40: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     if (box.minutes < 10) cout << "0"; cout << box.minutes << ":";
                                        ^~~~
titlovi.cpp:23:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (box.seconds < 10) cout << "0"; cout << box.seconds << ",";
     ^~
titlovi.cpp:23:40: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     if (box.seconds < 10) cout << "0"; cout << box.seconds << ",";
                                        ^~~~
titlovi.cpp:29:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (box.houre < 10) cout << "0"; cout << box.houre << ":";
     ^~
titlovi.cpp:29:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     if (box.houre < 10) cout << "0"; cout << box.houre << ":";
                                      ^~~~
titlovi.cpp:30:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (box.minutee < 10) cout << "0"; cout << box.minutee << ":";
     ^~
titlovi.cpp:30:40: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     if (box.minutee < 10) cout << "0"; cout << box.minutee << ":";
                                        ^~~~
titlovi.cpp:31:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (box.seconde < 10) cout << "0"; cout << box.seconde << ",";
     ^~
titlovi.cpp:31:40: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     if (box.seconde < 10) cout << "0"; cout << box.seconde << ",";
                                        ^~~~
titlovi.cpp: In function 'int main()':
titlovi.cpp:107:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < times.length(); i++) {
                         ~~^~~~~~~~~~~~~~~~
titlovi.cpp:125:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (i + 1 == times.length()) {
                 ~~~~~~^~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...