TestTrial's blog

By TestTrial, history, 3 years ago, In English

I'm pretty dumbfounded with 15A(15A - Cottage Village). I thought I figured this problem out yet there seems I still miss something. I get a wrong answer for case 11 which is too big to manually check, yet I've got no further ideas on how to improve my code. Any visible flaws or missed points?

My idea was to sort all the x-coordinates of houses' endpoints and iterate with i+=2 (to avoid overlapping houses) over them and check whether another house fits perfectly (count++) or if some space is still left for another possibility (count+=2).

Here is my submission: 112622985

Any help is greatly appreciated. Thanks a bunch

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By TestTrial, history, 3 years ago, In English

I'm trying to solve problem 18A (18A - Triangle) at the moment, but for some reason i get RUNTIME ERROR on test 2 even though my code works perfectly fine both in VS Code and GDB online compiler. I have no idea what could be wrong and codeforces doesn't give me any hints. Any suggestions?

Here is my submission: 112722655

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By TestTrial, history, 3 years ago, In English

I've spent quite some time figuring out why is it that for problem (8A - Поезд и Петя), instead of "forward" at test 14, my output is "both", but to no avail. Since the entire string is hidden and I am shown just a part of it, it's quite hard to understand where the mistake could be. Here is my submission: 95835050. Thank you in advance. Edit: Some flaws fixed but no real result yet 95837954

Full text and comments »

  • Vote: I like it
  • +10
  • Vote: I do not like it

By TestTrial, history, 4 years ago, In English

Hey so here is my solution for problem 1A. Theatre Square:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    int n, m, a;
    scanf("%i %i %i", &n, &m, &a);
    long long int x;
    x = (long long int)ceil((float)m/a)*ceil((float)n/a);
    printf("%lli", x);
 
    return 0;
}

But codeforce's verdict is Wrong answer on test 16:

Test: #16, time: 15 ms., memory: 4 KB, exit code: 0, checker exit code: 1, verdict: WRONG_ANSWER Input 1000000000 1000000000 999999999 Output 1 Answer 4 Checker Log wrong answer 1st numbers differ — expected: '4', found: '1'

However, if I check the input manually, I'm receiving the output 4 which is exactly what I'm supposed to get. Is it a bug of some sort? And if it is, what can I do now?

Full text and comments »

Tags #bug, 1a
  • Vote: I like it
  • +1
  • Vote: I do not like it