Submission #17764

# Submission time Handle Problem Language Result Execution time Memory
17764 2016-01-12T10:13:37 Z Elibay Weighting stones (IZhO11_stones) C++
8 / 100
368 ms 4064 KB
#include <bits/stdc++.h>
#define Fname ""
 
using namespace std;
 
const int MaxN = 3e5 + 17, INF = 1e9 + 17, Mod = 1e9 + 7;
 
double Sx, Sy, Mx, My, Sum, M2x, M2y, a[MaxN];
int n, kol1, kol2, x, y;
 
int main ()
{
    #ifdef Elibay
        freopen (".in", "r", stdin);
    #endif
    cin >> n;
    for (int i = 1; i <= n; ++ i)
        Sum += 0.1, a[i] = Sum;
    for (int i = 1; i <= n; ++ i)
    {
        cin >> x >> y;
        if (y == 2)
            Mx += x * 1.0 + 0.999, Sx += x * 1.0, kol2 ++, M2x += a[x * 1];
        else
            My += x * 1.0 + 0.999, Sy += x * 1.0, kol1 ++, M2y += a[x * 1];
        if (Sx > My && kol2 >= kol1 && M2x > M2y)
            puts ("<");
        else if (Sy > Mx && kol1 >= kol2 && M2y > M2x)
            puts (">");
        else
            puts ("?");
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 4064 KB Output isn't correct - 14th words differ - expected: '?', found: '>'
2 Incorrect 0 ms 4064 KB Output isn't correct - 6th words differ - expected: '?', found: '>'
3 Incorrect 0 ms 4064 KB Output isn't correct - 8th words differ - expected: '?', found: '<'
4 Incorrect 0 ms 4064 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
5 Incorrect 4 ms 4064 KB Output isn't correct - 14th words differ - expected: '?', found: '>'
6 Incorrect 0 ms 4064 KB Output isn't correct - 36th words differ - expected: '?', found: '<'
7 Incorrect 0 ms 4064 KB Output isn't correct - 17th words differ - expected: '?', found: '<'
8 Incorrect 0 ms 4064 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
9 Incorrect 3 ms 4064 KB Output isn't correct - 4th words differ - expected: '?', found: '>'
10 Incorrect 28 ms 4064 KB Output isn't correct - 8th words differ - expected: '?', found: '<'
11 Incorrect 136 ms 4064 KB Output isn't correct - 4th words differ - expected: '?', found: '<'
12 Incorrect 320 ms 4064 KB Output isn't correct - 4th words differ - expected: '?', found: '>'
13 Correct 298 ms 4064 KB Output is correct - 100000 tokens
14 Correct 285 ms 4064 KB Output is correct - 100000 tokens
15 Incorrect 229 ms 4064 KB Output isn't correct - 26th words differ - expected: '?', found: '<'
16 Incorrect 279 ms 4064 KB Output isn't correct - 9th words differ - expected: '?', found: '>'
17 Incorrect 250 ms 4064 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
18 Incorrect 284 ms 4064 KB Output isn't correct - 4th words differ - expected: '?', found: '<'
19 Incorrect 255 ms 4064 KB Output isn't correct - 17th words differ - expected: '?', found: '>'
20 Incorrect 263 ms 4064 KB Output isn't correct - 13th words differ - expected: '?', found: '>'
21 Incorrect 368 ms 4064 KB Output isn't correct - 11th words differ - expected: '?', found: '<'
22 Incorrect 242 ms 4064 KB Output isn't correct - 11th words differ - expected: '?', found: '<'
23 Incorrect 320 ms 4064 KB Output isn't correct - 7th words differ - expected: '?', found: '<'
24 Incorrect 251 ms 4064 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
25 Incorrect 320 ms 4064 KB Output isn't correct - 9th words differ - expected: '?', found: '<'