Submission #479345

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4793452021-10-11 12:40:08rainboyTitlovi (COCI19_titlovi)C11
50 / 50
1 ms204 KiB
#include <stdio.h>
#include <string.h>
#define K 30
#define L 16384
#define T 86400000
int main() {
static char buf[L], txt[K][L];
static int xx[K], ll[K], rr[K];
int k, h, t;
k = 0;
while (1) {
int h1, m1, s1, ms1, h2, m2, s2, ms2;
char *ptr;
fgets(buf, L, stdin), sscanf(buf, "%d", &xx[k]);
fgets(buf, L, stdin), sscanf(buf, "%d:%d:%d,%d --> %d:%d:%d,%d",
&h1, &m1, &s1, &ms1,
&h2, &m2, &s2, &ms2);
ll[k] = ((h1 * 60 + m1) * 60 + s1) * 1000 + ms1;
rr[k] = ((h2 * 60 + m2) * 60 + s2) * 1000 + ms2;
ptr = txt[k++];
while (1) {
char c;
fgets(ptr, L, stdin);
c = ptr[0], ptr += strlen(ptr);
if (c == '\n')
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

titlovi.c: In function 'main':
titlovi.c:18:3: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |   fgets(buf, L, stdin), sscanf(buf, "%d", &xx[k]);
      |   ^~~~~~~~~~~~~~~~~~~~
titlovi.c:19:3: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
   19 |   fgets(buf, L, stdin), sscanf(buf, "%d:%d:%d,%d --> %d:%d:%d,%d",
      |   ^~~~~~~~~~~~~~~~~~~~
titlovi.c:28:4: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
   28 |    fgets(ptr, L, stdin);
      |    ^~~~~~~~~~~~~~~~~~~~
titlovi.c:37:2: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
   37 |  fgets(buf, L, stdin), sscanf(buf, "%d", &t);
      |  ^~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...