QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#627087 | #7747. Memory | yixuanoct# | WA | 0ms | 3704kb | C++14 | 486b | 2024-10-10 14:42:16 | 2024-10-10 14:42:17 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e6 + 7;
const int INF = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
signed main() {
ios::sync_with_stdio(false), cin.tie(0);
int n;
cin >> n;
double mood = 0;
for (int i = 0;i < n;i++) {
int x;
cin >> x;
mood = mood / 2 + x;
if (mood > 0) cout << '+';
else if (mood < 0) cout << '-';
else cout << '0';
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3704kb
input:
10 2 -1 4 -7 4 -8 3 -6 4 -7
output:
+0+-+---+-
result:
ok single line: '+0+-+---+-'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
10 -1 36 18 18 18 18 18 18 18 -18
output:
-++++++++-
result:
ok single line: '-++++++++-'
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3652kb
input:
1000 -1 193552 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 967...
output:
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++...
result:
wrong answer 1st lines differ - expected: '-+++++++++++++++++++++++++++++...++++++++++++++++++++++++++++++-', found: '-+++++++++++++++++++++++++++++...++++++++++++++++++++++++++++++0'