| Show all threads Hide all threads Show all messages Hide all messages |
| что в 3 тесте | kostan3 | 1548. Sakura and Statistics | 3 Jun 2013 20:00 | 1 |
|
| WA#41 | NotImplemented | 1338. Automobiles | 3 Jun 2013 19:48 | 1 |
WA#41 NotImplemented 3 Jun 2013 19:48 Can you give me a hint with test #41? |
| Help!!!! № 1000 | Dimmell | 1000. A+B Problem | 3 Jun 2013 19:24 | 1 |
С хера он не принимает задачу?! Вот: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Dimmell { class Program { static void Main(string[] args) { int a = Convert.ToInt32(Console.ReadLine()); int b = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(a + b); } } } Edited by author 03.06.2013 19:24 |
| WA2 or is it? | alpha900i | 1353. Milliard Vasya's Function | 3 Jun 2013 17:05 | 2 |
Ok, so my program gets WA2. And if I add code like int t2=45; if(n==2) cout << t2 << endl; I get WA3. Funny fact though - "45" is answer my program always gave for n==2. So we have two different "45", and only one of them is good as answer. Somehow cout << s(9,n) << endl; doesn't work well, even if s(9,n)=45. Someone had problems of this kind? Ok-key, my bad. Had some good little out-of-array code in my check function, so it spoiled everything. |
| cannot get the meaning, sigh. | hliu20 | 1776. Anniversary Firework | 3 Jun 2013 09:28 | 1 |
|
| Runtime error: Access Violation | Anush Ramsurat | 1118. Nontrivial Numbers | 3 Jun 2013 01:26 | 1 |
I'm getting a 'runtime error: access violation' on my code. Please help me out. Here is the program in C++: #include<iostream> using namespace std; int main() { int i,j,a,sum,p,q; float small,ratio[30],x; cin>>p>>q; //Inputs //To find the ratio for each number in the interval i to j. for(i=p;i<=q;i++) {sum=0; for(j=1;j<i;j+=1) { if(i%j==0) { sum+=j; } } ratio[i]=sum/i; } //To find the number with the smallest ratio and display it. small=ratio[p]; for(i=p+1;i<=q;i+=1) { if(ratio[i]<small) { small=ratio[i]; x=i; } } cout<<x; return 0; } |
| I don't understand this problem. | raxtinhac | 1121. Branches | 2 Jun 2013 16:18 | 5 |
Please explain the test, I think there 're something wrong or I don't understand the task. I've read that problem twice, but i didn't undestand Sample is Correct, You misunderstanding the prob, we didn't add the number's together, we "bit or" the number Notice that the Branches ID is 1, 2, 4, 8, 16 ~~ and so on So if this cross road has a Number 5 it means 1001(in Binary), so it has 2 branches : type 1 and type 3 we must output the total sum of branch types, so when we meet two cross road with 5 and 1,we must use operation 'bit or' (in C, it's '|') to calculate the total sum of branch types. so you understand? Edited by author 27.08.2008 20:51 The obscurity of the statement is outrageous! For each point you need to increase distances until you find a distance, such that there are some non-zeros or you reach the distance of 5. Once you reach the distance you need to bitwise OR all the numbers at this distance. Thanks, this is helping. but its very difficult to get this point of stopping at distance when one gets or of values greater than zero. |
| Wrong statement. | oxoxonin | 1313. Some Words about Sport | 1 Jun 2013 22:44 | 2 |
As I can see this statement is wrong: "Пиксели нумеруются от левого верхнего угла, по диагоналям, слева-направо и снизу-вверх". There should be "сверху-вниз". Am I right? No, you are not right. See one more time: 1 3 6 2 5 8 4 7 9 :) |
| Closed. | oxoxonin | 1910. Titan Ruins: Hidden Entrance | 1 Jun 2013 21:36 | 1 |
Edited by author 01.06.2013 22:05 |
| WA#19 Time limit exceeded 19 1.046s 636 КБ =( | =NRZ= | 1510. Order | 1 Jun 2013 17:11 | 4 |
Edited by author 02.05.2011 23:00 There is a method that you can find the solution with one loop. here is a hint: 1. if solution is s and sn is the number of s, then 2 * sn > n 2. if you delete any two different numbers until there is no different number, so this number is s.(because 2 * sn > n). And you can do deleting with one loop. good luck use quickSort and output [n/2] value... |
| wa #7 | Freddy | 1910. Titan Ruins: Hidden Entrance | 30 May 2013 23:18 | 1 |
wa #7 Freddy 30 May 2013 23:18 what is test case 7? I think my doing well. #include<stdio.h> int main() { int n,val[1001],pos1=2,pos2=1,sum[1001]; scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&val[i]); for(int i=2;i<=n-1;i++) { sum[i]=val[i-1]+val[i]+val[i+1]; } for(int i=2;i<=n-1;i++) { if(sum[i]>=sum[i+1]) { sum[i+1]=sum[i]; pos2++; } else if(sum[i]<sum[i+1]) { pos1+=pos2; pos2=1; } } printf("%d %d",sum[n-1],pos1); } |
| WA #1 please help! | Freddy | 1197. Lonesome Knight | 30 May 2013 19:45 | 1 |
I don't understand where I'm wrong. I tried the sample and the result is right! #include<iostream> #include<map> using namespace std; int main() { int n,num; map<char,int> val; val['a']=1;val['b']=2;val['c']=3;val['d']=3;val['e']=3;val['f']=3;val['g']=2;val['h']=1; val['1']=1;val['2']=2;val['3']=3;val['4']=3;val['5']=3;val['6']=3;val['7']=2;val['8']=1; char xy[1]; cin>>n; while(n--) { cin>>xy; num=val[xy[0]]+val[xy[1]]; if(num==6) num+=2; if(num==5) num++; cout <<num<<endl; } } |
| My Successfully code | Paata Julakidze | 1585. Penguins | 30 May 2013 14:47 | 1 |
import java.util.*; public class Penguins1585 { /** * @param args */ public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = Integer.parseInt(in.nextLine()); int a=0,b=0,c=0; for(int i=0; i<n; i++){ String s = in.nextLine(); String s1=s.substring(0,1); if(s1.equals("E"))a++; else if(s1.equals("M"))b++; else c++; }
if(a>=b && a>=c)System.out.print("Emperor Penguin"); else if(b>=a && b>=c) System.out.print("Macaroni Penguin"); else System.out.print("Little Penguin");
} } |
| Difference in compilers? | Ade | 1001. Reverse Root | 29 May 2013 22:09 | 1 |
The question is simple. So is my code. See below It gets AC in VC++2000. But why does it get WA#1 in gcc4.7.2 and gcc4.7.2-c++11, until I replace the while-scanf loop with the commented while-cin loop? Thanks. -- #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <vector> int main() { std::vector<long long> v; long long t; while (std::scanf("%lld", &t) != EOF) { // while (std::cin >> t) { v.push_back(t); } for (int i=v.size()-1; i>=0; --i) { printf("%.5f\n", sqrt((double)(v[i]))); } } |
| Test 3 | 49warrior | 1131. Copying | 29 May 2013 03:49 | 2 |
Test 3 49warrior 22 Oct 2008 23:58 In this test use LONG INT. I use INT and got WA, but later I use LONG INT and got AC. |
| Help me. What's wrong? C++ task 1001 | Vladislav | 1001. Reverse Root | 28 May 2013 20:19 | 1 |
#include <stdio.h> #include <math.h> #define N 4 int main() { long double a[N]; long double b[N]; int i = 0; while(i < N) { scanf("%Lf",&a[i]); b[i]=sqrt((long double)a[i]); i++; } if(i == N) for(i= N - 1; i>=0; i--) { printf("%.4Lf\n", b[i]); }
} seems to return the right values. But writes "Wrong answer". Thanks! |
| why it is wrong ? (JAVA) | shaihin | 1820. Ural Steaks | 27 May 2013 23:42 | 2 |
import java.util.*; public class Bifshteks //zadacha -1820 { int n; int k; int clock; public static void main(String args[]) { Bifshteks b = new Bifshteks(); Scanner in = new Scanner(System.in); System.out.println("Skolko bifshteksov zakazat? - "); b.n = in.nextInt(); while(b.n > 1000 || b.n<0 ) {System.out.println("Skajite zanovo . Vam Skolko bifshteksov zakazat? - "); b.n = in.nextInt(); } System.out.println("Skolko bifshteksov mojet gotovitsia odnoremenno? - "); b.k = in.nextInt(); int y = b.n/b.k; int x = b.n-(y*b.k); if(x==0) y+=0; else y+=1; System.out.println("Vaw zakaz budet gotov cherez "+y*2+" minut."); } } Обратите внимание на постановку задачи: "В единственной строке через пробел записаны целые числа n и k (1 ≤ n, k ≤ 1000)." В Вашем случае одновременно 2 целых числа ввести нельзя. |
| what is outcome change? | melkiy | 1718. Rejudge | 27 May 2013 13:01 | 3 |
"...solutions for which the outcome has changed." Is the outcome change "WA 6" -> "WA 8" a real change on which a letter is sent? Or only outcome code (WA, AC, ...) make sense, not a test number?? Edited by author 10.10.2009 14:54 Edited by author 10.10.2009 14:54 sorry, the condition contains the answer it's both change in code and change in test number. |
| wa2 | SamGTU7_Kareva Nadezhda Vladimirovna | 1196. History Exam | 26 May 2013 21:50 | 1 |
wa2 SamGTU7_Kareva Nadezhda Vladimirovna 26 May 2013 21:50 Help me find a mistake using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace курсач_1196 { class Program { static void Main(string[] args) { int n1 = int.Parse(Console.ReadLine()); int[] a = new int[n1]; for (int i = 0; i < n1; i++) a[i] = int.Parse(Console.ReadLine()); int n2 = int.Parse(Console.ReadLine()); int[] b = new int[n2]; for (int j = 0; j < n2; j++) b[j] = int.Parse(Console.ReadLine()); Array.Sort(a); int[] ab = a.Intersect(b).ToArray(); Console.WriteLine(ab.Length); } } } |
| тест 6 | SamGTU7_Kareva Nadezhda Vladimirovna | 1910. Titan Ruins: Hidden Entrance | 26 May 2013 19:04 | 1 |
тест 6 SamGTU7_Kareva Nadezhda Vladimirovna 26 May 2013 19:04 Please help pass the test 6. It is very necessary. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _1910 { class Program { static void Main(string[] args) { string str = Console.ReadLine(); int n = int.Parse(str); string[] mas = Console.ReadLine().Split(' '); int[] a=new int[n]; for (int i=0; i<n; i++) a[i]=int.Parse(mas[i]); int sum=0, j=0, maxsum=0; if (n >= 3) { for (int i = 0; i < n - 2; i++) { if ((a[i] == a[i + 1]) && (a[i] == a[i + 2])) { sum = a[i]*3; j = i + 2; } if (sum > maxsum) { maxsum = sum; sum = 0; } } } Console.WriteLine(maxsum + " " + j); } } } |