|
|
Общий форумAssume maxX is -1 and minY is -2. Is it correct that there should be no axis on the graph? Edited by author 05.01.2013 13:51 The first line should correspond to the maximum value of y (or 0) Ah, sorry got it. Can ansistring (pascal) take 500000*3+const symbols? Edited by author 05.01.2013 14:25 Is ".5" real number? Same question about "1." UPD: looks like ".5" is not, about "1." I'm not sure but there isn't much trouble with such numbers. Edited by author 05.01.2013 13:20 #include<iostream> #include<cmath> using namespace std; int tinh(int x, int n) { int temp = 1; for(int i = 0; i < n; i++) temp *= x; return temp; } void main() { int n, m, y, x; bool flag = true; cin >> n >> m >> y; for(x = 0; x < m; x++) { if(tinh(x, n)%m == y) { cout << x << " "; flag = false; } } if(flag) cout << -1; } tinh(x, n) may produce a very big number that leading overflow let me know test 2 please...! I have AC, but it seems to me that my algo isn't the best. I used DP. Is there any formula? If I run public class Stacks { public static void main(String... args) { System.gc(); } } It reports I exceed the memory limit with a usage of 4885 KB. public class Stacks { public static void main(String... args) { System.gc(); } } Reports 326 KB used. How is the memory usage determined. I assume you cannot have your managed memory trigger a GC which is a bit restrictive for Java. Could you tell me case for Text 14.Thank You Could you give me case for 14.Thank you. Hi! How can I get the data for the tests? For example - 1) coding task number N! 2) send for checking! 3) Wrong answer! Test number 2! 4) How to get input data for test 2? Thanks for the help! Nobody will give you the testdata. Edited by author 02.01.2013 23:17 i have a problem in test 6, can't find ,whats the matter?!?! help plz!! ok, i have found it it's prob-ly test 0 0 0 0 0 0 1 No, you aren`t right. 0 0 0 0 0 0 - is invalid test case. Feature of test #6 is that ticket coast is greater then minimal nominal of bank notes set present. my English is not very good. I don't think that i understand your statement clearly. Can you explain it or give sample test for your statement. Tks. I've seen lots of guys crashed on test 2. Could anyone provide a hint for this test? I don't now why!! AAAAAAAA!!!! WWWW WBBW WBWW WWWW 000 011 010 is it impossible?? WWWW WBBW WBWW WWWW 000 011 010 Why impossible? Answer has to be one, since choosing 2,2 cell will turn all cells to white. But I still get WA10. Please help . . . You've forgotten, that cenrtral piece must leave. Are you saying that we should not turn the piece at the center of mask? There was no task condition about that. var s: char; i, sim: integer; begin sim:=0; while not EOF do begin //for i:=1 to s do begin read (s); if ((s='a') or (s='d') or (s='g')or(s='g') or (s='m')or (s='p') or (s='t') or (s='w')) then sim:= sim+1 else if ((s='b') or (s='e') or (s='h') or (s='k') or(s='n') or (s='q') or (s='u') or (s='x')) then sim:= sim+2 else if ((s='c') or (s='f') or (s='i') or (s='o') or (s='r') or (s='v') or (s='y')) then sim:= sim+3 else if ((s='s') or (s='z')) then sim:=sim+4 else if (s=' ') then sim:=sim+1 else if (s='.') then sim:= sim+1 else if (s=',') then sim:= sim+2 else if (s='!') then sim:= sim+3 end end; write (sim); end. Edited by author 31.12.2012 01:58 Can anybody tell what the problem ? Edited by author 30.12.2012 19:51 From : We know that there are more than P% conductors and less than Q% conductors. To clarify, you should write : By percentage, we know that there are more than P% conductors and less than Q% conductors of all Russian citizens in this city. Until I've read several comments in discussion, I found out what the problem wants. Sincerely. I added a little clarification to the sentence about percentage and a hint about sample test. Now the problem statement should be easier to understand. Can you explain me the first example.. why 17?? They can cross for 17 in such a way: 1,2--> <--1 5,10--> <--2 1,2--> |
|
|