Show all threads Hide all threads Show all messages Hide all messages |
Test #5 pls | Vladislav Yavorsky | 1891. Language Ocean | 16 Dec 2020 10:13 | 1 |
|
WA#37 | gautamvs | 1891. Language Ocean | 9 Aug 2018 20:10 | 2 |
WA#37 gautamvs 9 Dec 2012 18:41 Please, somebody provide with test case ... Check for "Invalid initialization" case. Edited by author 09.08.2018 20:10 |
WA6 | George_Aloyan[PTSObninsk] | 1891. Language Ocean | 3 Feb 2016 11:14 | 2 |
WA6 George_Aloyan[PTSObninsk] 29 Oct 2011 23:19 Can anybody tell something for wa6? Edited by author 29.10.2011 23:21 Re: WA6 kaa..........ai 3 Feb 2016 11:14 Maybe this test can help you! 3 ReadString() : string ReadReal() : real RealToString(real) : string 3 string s = ReadString() real r = ReadReal() auto k = RealToString(r) |
WA #20 | igloo | 1891. Language Ocean | 29 Oct 2015 05:23 | 2 |
WA #20 igloo 21 Jun 2013 02:10 "The interpreter must check EACH LINE of the main program searching for the following errors". Edited by author 21.06.2013 02:12 Re: WA #20 Jane Soboleva (SumNU) 29 Oct 2015 05:23 Which means that lines have a priority, not types of errors. Say, the program has 1st type of error in line 10, and 2nd + 4th types of error in line 2. When i had WA20, i checked for each of 4 types of errors in that order, and if i found one, i wrote it and finished my program (in this case, outputting error in line 10). Instead, you should check for all 4 types of errors in all lines, and output an earliest line in which an error occurs. And if several errors occur in that earliest line, then you should output an error with higher priority. Thus for case above, you should output 2nd error type in line 2. |
If you have WA14 | [RISE] Levon Oganesyan [RAU] | 1891. Language Ocean | 25 Apr 2015 03:34 | 1 |
3 a() : int a(int) : real a(real) : int 3 int x = a() auto y = a(x) auto z = a(y) WA14 program says Error on line 3: No such function But right answer is y : real z : int |
java String split so good) | QProgS | 1891. Language Ocean | 31 May 2014 22:18 | 1 |
|
WA 27 | Sunnat | 1891. Language Ocean | 20 May 2014 19:02 | 1 |
WA 27 Sunnat 20 May 2014 19:02 what's wrong in my code, please give me some test #include <iostream> #include <vector> #include <string> #include <map> using namespace std; map<string,string>functions; map<string,string>variables; int main(){ int count_function, count_variable,i,j; string line,s1,s2,s, type; cin >> count_function; for(i = 0; i < count_function; i ++){ cin >> s1; while(cin >> s){ if(s == ":") break; s1 = s1 + " " + s; } cin >> s2; functions[s1] = s2; }
cin >> count_variable;
vector<string>variable; vector<string>types;
for(i = 0; i < count_variable; i ++){ cin >> type >> s >> s1 >> s1; while(s1[s1.size() - 1] != ')'){ cin >> s2; s1 = s1 + " " + s2; } if(variables.find(s) == variables.end()){ s2 = ""; j = 0; while(s1[j] != '(') s2 += s1[j++]; s2 += '('; j ++; while(s1[j] != ')'){ line = ""; while(s1[j] != ',' && s1[j] != ')') line += s1[j++]; if(variables.find(line) == variables.end()){ cout << "Error on line " << i + 1 << ": " << "Unknown variable" << endl; return 0; } s2 += variables[line]; if(s1[j] == ','){ s2 += ", "; j += 2; } } s2 += ')';
if(functions.find(s2) == functions.end()){ cout << "Error on line " << i + 1 << ": " << "No such function" << endl; return 0; }
s2 = functions[s2];
if(type == "auto"){ variable.push_back(s); types.push_back(s2); type = s2; } if(type != s2){ cout << "Error on line " << i + 1 << ": " << "Invalid initialization" << endl; return 0; } variables[s] = s2; }else{ cout << "Error on line 2: Double declaration" << endl; return 0; } } for(i = 0; i < types.size(); i ++) cout << variable[i] << " : " << types[i] << endl; return 0; } |
WA #5 | igloo | 1891. Language Ocean | 21 Jun 2013 02:08 | 1 |
WA #5 igloo 21 Jun 2013 02:08 In one line more then one error. 1 ReadInt2() : int ReadInt(int) : int 2 int x = ReadInt2() int x = ReadInt(y) |
Why WA1? | Andrew Sboev | 1891. Language Ocean | 8 May 2012 22:40 | 1 |
My prog passes all tests what I found, but still WA1. Surely, output format is right. Sorry, stupid fault, forgot to delete extra lines of code. Got AC :) But why too few AC solutions? Problem is so easy. Edited by author 08.05.2012 22:47 |
What's test 7? | purplest | 1891. Language Ocean | 27 Mar 2012 11:06 | 1 |
Could anyone tell me the test 7? thx === just AC it ..= = Edited by author 27.03.2012 11:45 |
What's test 14? | xiaohao() | 1891. Language Ocean | 18 Dec 2011 00:33 | 2 |
Try something like: 3 a() : real a(real) : int a(int) : real 3 auto b = a() int c = a(b) auto d = a(c) Output should be: b : real d : real |
Wrong Answer Test 4 | Andrew_RUS | 1891. Language Ocean | 10 Nov 2011 18:20 | 3 |
Can anyone help with test 4? 1 Sum(int) : int; 1 int s = Sum(s) Ans : "Error on line 1: Unknown variable" Edited by author 09.11.2011 17:27 Thank you very much! I didn't notice this testcase earlier and got AC with your help! |
No subject | George_Aloyan[PTSObninsk] | 1891. Language Ocean | 29 Oct 2011 23:28 | 3 |
No subject George_Aloyan[PTSObninsk] 29 Oct 2011 22:05 1 SumRealInt(real, int) : real 1 auto x = SumRealInt(c, v) Answer: Error on line 1: Unknown variable Re: WA4 Borozdin Kirill 29 Oct 2011 23:28 My program passed your test but it stills get WA4. Do you have any more? UPD: At last I solved it. See neighbour topic for help ;) Edited by author 10.11.2011 18:19 Edited by author 10.11.2011 18:19 |