GOT WA for some reason. Any hint? Tried all inputs and every output is same (compared with https://www.diffchecker.com/diff).
Problem solved. There is an example how I had to change my reading
while (cin >> s && getline(cin, number) && !(s == 0))
{
int start = 0;
while (start < number.length ...
Search found 3 matches
- Sat Sep 26, 2015 1:50 am
- Forum: Volume 7 (700-799)
- Topic: 706 - LCD Display
- Replies: 221
- Views: 65400
- Sat Nov 08, 2014 1:20 am
- Forum: Volume 100 (10000-10099)
- Topic: 10033 - Interpreter
- Replies: 88
- Views: 39519
Re: 10033 - Interpreter
Hi, there is my code
else if (instruction == 9)
ram[ram[b]] = r[a]; // facepalm
I tried this input
5
299
492
495
399
492
495
399
283
279
689
078
100
000
000
000
221
422
425
000
311
712
712
913
031
299
233
255
990
803
301
050
100
212
415
521
721
532
439
543
631
339
923
029
873
674
027
023 ...
else if (instruction == 9)
ram[ram[b]] = r[a]; // facepalm
I tried this input
5
299
492
495
399
492
495
399
283
279
689
078
100
000
000
000
221
422
425
000
311
712
712
913
031
299
233
255
990
803
301
050
100
212
415
521
721
532
439
543
631
339
923
029
873
674
027
023 ...
- Wed Oct 29, 2014 2:13 am
- Forum: Volume 120 (12000-12099)
- Topic: 12060 - All Integer Average
- Replies: 6
- Views: 4444
Re: 12060 - All Integer Average
Hello guys, I have compared sample output + 100 test cases from this thread and I have same output. Im getting WA.
Here is the code
code removed
Thanks for any help!
EDIT: This helped:
INPUT:
5 100 245 245 410 417
3 1 2 3
4 2 4 6 10
3 -1 -2 -3
2 1 -1
0
OUTPUT:
Case 1:
2
283-
5
Case 2:
2
Case ...
Here is the code
code removed
Thanks for any help!
EDIT: This helped:
INPUT:
5 100 245 245 410 417
3 1 2 3
4 2 4 6 10
3 -1 -2 -3
2 1 -1
0
OUTPUT:
Case 1:
2
283-
5
Case 2:
2
Case ...