| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| WA #35 | Vladimir Chirkov | 1464. Освещение | 17 июн 2015 17:29 | 2 |
WA #35 Vladimir Chirkov 17 июн 2015 16:19 Please help me. I cann't find what is wrong. Any tests or ideas please. I found a bug. All tests are OK! |
| My AC | TUITUF_Temurbek | 1644. Куча орехов | 17 июн 2015 13:14 | 2 |
My AC TUITUF_Temurbek 29 авг 2013 12:41 import java.util.Scanner; public class T_1644 { public static void main(String[] args) { Scanner sc= new Scanner(System.in); int n=sc.nextInt(); int min=10; int max=Integer.MIN_VALUE; for (int i = 0; i < n; i++) { int x=sc.nextInt(); String s=sc.next(); if(s.equals("hungry"))max=Math.max(x, max); else min=Math.min(min,x); } if(max<min) System.out.println(min); else System.out.println("Inconsistent"); } } |
| Wrong answer 55, give me some tests, please | Ivan Metelev | 2011. Длинное условие | 17 июн 2015 01:35 | 1 |
// code deleted Edited by author 17.06.2015 01:38 |
| What's WA#5? | novopashinwm | 2011. Длинное условие | 17 июн 2015 01:15 | 3 |
4 1 1 1 1 No 4 1 1 2 2 Yes 4 1 1 1 2 No 4 2 1 1 1 NO Try this tests. It helps me. But I have WA #55 and I need a help Edited by author 17.06.2015 02:16 |
| java AC | esbybb | 1644. Куча орехов | 16 июн 2015 05:28 | 2 |
Messages should not contain correct solutions. i use 2 TreeSet<Integer>, nope, ok nope is prepopulated with 2, ok is prepopulated with 10 in cycle i read counts into one of them with checking if other one does not contain new value has been read recently if nope.last()>=ok.first() then the result is ok.first() nope.last>=ok.first ("g" instead of "ge" because they are never equal) |
| WA 15 | Sunnat | 1830. Справка в НацОС | 16 июн 2015 03:04 | 2 |
WA 15 Sunnat 15 июн 2015 21:46 This test helped me! 8 01100101 00000000 answer: 196 some test case : input : 8 10101010 01010101 answer : 102 intput : 14 00101000111001 00000011000010 answer : 6809 good luck :) Edited by author 16.06.2015 03:25 |
| To admins | Hung | 1002. Телефонные номера | 15 июн 2015 22:43 | 2 |
subject 1002 wrong answer 1 I think that admins do not read this site) They are only old students) Edited by author 15.06.2015 22:44 |
| To admins: not completely clear Russian problem statement | MVM | 1089. Проверка со словарём | 15 июн 2015 09:00 | 2 |
It is said that text contains not more than 1000 words, but limitations on length of words exist (in statement) only for dictionary. It means that (technically) Russian statement does not bound length of text at all. So, can you tweak problem statement a bit to make it more clear, please? Edited by author 30.07.2014 20:05 +1 I agree, the statement isn't clear. You don't even know how much memory you're supposed to allocate for the text/words in the text. I just had to assume that the words weren't bigger than 1000 symbols. Anyway, now that I solved it and tested it, I can confirm that length of the words in the text doesn't exceed 8 symbols as well. |
| problem name : scholarship(2056) | MD.AL AMIN | 1083. Факториалы!!! | 14 июн 2015 21:51 | 1 |
why wrong ans test case # ?? Plzzz help my code: #include<bits/stdc++.h> using namespace std; int main() { int a[12],n,i; //int n,i; float res,sum=0; cin>>n; for(i=0; i<n; i++) { cin>>a[i]; sum+=a[i]; } res=(float)sum/n; if(res==5) printf("Named\n"); else if(res>=4.5&&res<5) printf("High\n"); else if(res>3&&res<4.5) printf("Common\n"); else printf("None\n"); return 0; } |
| java AC code | esbybb | 1119. Метро | 14 июн 2015 17:28 | 3 |
Messages should not contain correct solutions. i use matrix of costs, each step set value of the cell as minimal of the previous vertical cost + 100, previous horizontal cost + 100, previous diagonal cost + 100*sqrt(2) the answer is Math.round(cost[M][N]) p.s. cycle is organized from 1 to n, 1 to m inclusively Edited by author 14.06.2015 17:09 by default diagonal cost is set to MAX_VALUE, it is updated in case of a[i][j]=true, where a is a matrix of allowed to be crossed through diagonally cells also column with index 0 is populated incrementally (cost[0][0]=0, cost[1][0]=100, cost[2][0]=200..) as well as row with index 0 before the main nested loop starts |
| Why "Compilation error"? | Jimbo | 1001. Обратный корень | 14 июн 2015 09:34 | 1 |
#include <iostream> #include <vector> #include <cmath> using std::cout; using std::cin; using std::vector; using std::endl; int _tmain(int argc, _TCHAR* argv[]) { long long number; vector <long long> s; while (cin >> number) { s.push_back(number); } for (int i = s.size() - 1; i >= 0; --i) { cout << sqrt((long double)s[i]) << endl; } return 0; } uyyuzk-abb69e.cpp(12) : error C2061: syntax error : identifier '_TCHAR' Edited by author 14.06.2015 09:40 |
| Help me please. Where is error? В чем ошибка? | timur1108 | 1820. Уральские бифштексы | 14 июн 2015 04:44 | 2 |
var n,k,l:real; begin read(n,k); l:=(n*2/k); if trunc(l)=0 then write(2) else if frac(l)=0 then write(l) else write(trunc(l)+1); end. |
| Some tests | Flvl | 1106. Две команды | 13 июн 2015 19:18 | 1 |
WA 6 3 2 0 1 3 0 2 0 ----- 2 1 3 3 2 3 0 1 0 1 0 -- 1 1 WA 11 4 2 0 1 4 0 4 0 2 3 0 -- 2 1 3 WA 13 3 3 0 3 0 1 2 0 -- 2 1 2 |
| ACCEPT 0.015sec ! | arrammis | 1494. Монобильярд | 13 июн 2015 17:11 | 1 |
For the first time used deque which got 0.204sec after I have changed data structure to a vector got 0.015 sec runing time! insane :) |
| Test 3 has been detected!!! | Alibi | 1644. Куча орехов | 13 июн 2015 01:36 | 2 |
|
| Wa 8 | Zharenkov_ssau | 1644. Куча орехов | 13 июн 2015 01:34 | 4 |
Wa 8 Zharenkov_ssau 20 янв 2009 14:17 var i,j,k,n,d,l:longint; st:string; s:array [1..100] of string; a:array [1..100] of integer; begin readln (n); if n=0 then writeln ('10'); k:=0; st:=''; for j:=1 to n do begin readln (k,st); a[j]:=k; s[j]:=st; end; for l:=1 to n-1 do for i:=1 to n-l do begin if a[i]<a[i+1] then begin k:=a[i]; a[i]:=a[i+1]; a[i+1]:=k; st:=s[i]; s[i]:=s[i+1]; s[i+1]:=st; end; end; i:=1; if s[1]=' satisfied' then begin while s[i]=' satisfied' do begin i:=i+1; k:=a[i-1]; end; writeln (k); end; d:=1; if s[1]=' hungry' then begin for i:=2 to n do begin if s[1]=s[i] then inc(d); end; if d= n then writeln ('10') else writeln ('Inconsistent'); end; end. can you give some tests? Edited by author 20.01.2009 14:17 try this: 2 5 hungry 5 satisfied (answer is "Inconsistent") Re: Wa 8 Ealham Al Musabbir 13 июн 2015 01:34 |
| admins, my programm outputs correct answers on all the possible test cases but here I get WA2 | arrammis | 1038. Проверка орфографии | 12 июн 2015 15:57 | 1 |
What is in test 2 ?????????????????? YOUR TEST CASES ARE WROUNG MY PROGRAMM IS CORRECT !! my code: #include <iostream> #include <string> using namespace std; int main(int argc, char *argv[]) { string sent; char c = 0; size_t count = 0; while (cin.get(c)) { sent.push_back(c); if (c == '.' || c == '?' || c == '!') { size_t i = 0; while (i < sent.size() && !isalpha(sent[i])) { i++; } if (i < sent.size() && islower(sent[i])) count++;
string word = ""; for (size_t i = 0; i < sent.size() + 1; i++) { if (i < sent.size() && (isalpha(sent[i]))) { word += sent[i]; } else { for (size_t j = 1; j < word.size(); j++) { if (isupper(word[j]) && isalpha(word[j])) count++; } word = ""; } } sent.clear(); //cout << count << endl; } } cout << count; return 0; } Edited by author 12.06.2015 20:13 Edited by author 12.06.2015 20:13 |
| WA#5 | Armen Tsirunyan | 1038. Проверка орфографии | 12 июн 2015 15:46 | 2 |
WA#5 Armen Tsirunyan 9 ноя 2014 21:26 for WA5, try this test hEllo wOrld!!! w The correct answer is 4 why answer is 4 ???? i think 5 would be correct one |
| Can anybody explain the example... | Urrong | 1502. Точки домино | 12 июн 2015 03:17 | 4 |
i cant find 12 distinct combinations if N = 2... i can only think of: 0-0 0-1 0-2 1-1 1-2 2-2 That are only 6 combinations... what did i miss? 0-0 (0+0=0) 0-1 (0+1=1) 0-2 (0+2=2) 1-1 (1+1=2) 1-2 (1+2=3) 2-2 (2+2=4) | 0+1+2+2+3+4=12 got it? but how does the formula N*(N+1)/2*(N+2) comes ? pls explain... :) The problem does not ask you to count the # of distinct dominoes in a set, it asks you to count the # of dots on a complete set. |
| one puzzle | wust_tuzhaofeng | 1995. Запрещённые специи | 12 июн 2015 00:15 | 6 |
It is says, at least p percent from the total number of the bags that have already been checked If the total number includes current one? It does NOT include the current one. (and the statement should say "of the total number" and not "from the total number") |