Search found 28 matches

Sat Dec 12, 2015 5:14 am
Forum: Volume 17 (1700-1799)
Topic: UVa 1727 ( Counting Weekend Days )
Replies: 1
Views: 3032

Re: UVa 1727 ( Counting Weekend Days )

I have tried All possible I/Os that could be in the Judge Data Set . And I have simulate those I/O manually . Got Correct Answer for those Cases for my Code . Here is the I/O s I have Tried . Have I missed anything ... Help me . 84 JAN SAT FEB SAT MAR SAT APR SAT MAY SAT JUN SAT JUL SAT AUG SAT SEP ...
Sat Dec 12, 2015 5:10 am
Forum: Volume 17 (1700-1799)
Topic: UVa 1727 ( Counting Weekend Days )
Replies: 1
Views: 3032

UVa 1727 ( Counting Weekend Days )

Hey . Is there any problem with JUDGE DATA SET / Solution of the Problem ... of the Problem ... https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=868&page=show_problem&problem=4923 ( Counting Weekend Days ) I have submitted several Times But its getting WA all the time ....
Thu Nov 19, 2015 4:59 pm
Forum: Volume 107 (10700-10799)
Topic: 10793 - The Orc Attack
Replies: 35
Views: 19419

Re: 10793 - The Orc Attack

What is The Problem ???? I am Getting Wrong Answer :( #include<bits/stdc++.h> #define INF 99999999 using namespace std; int graph[105][105]; void init() { for(int i=1; i<=102; i++) { for(int j=1; j<=102; j++) { if(i==j) graph[i][j] = 0; else graph[i][j] = INF; } } } int main() { int test; scanf("%d"...
Wed Nov 11, 2015 3:15 am
Forum: Volume 3 (300-399)
Topic: 341 - Non-Stop Travel
Replies: 38
Views: 11184

Re: 341 - Non-Stop Travel

Hi, I have tried All the Cases of Samples & Forum .... Looks Okey . But Getting Wrong Answer . What's the Tricky Part of this Problem . Anyone help please .... Here is the Code : http://ideone.com/1uzCv7

Wed Sep 09, 2015 5:47 am
Forum: Volume 101 (10100-10199)
Topic: 10194 - Football (aka Soccer)
Replies: 119
Views: 36163

Re: 10194 - Football (aka Soccer)

Hi Why I am getting WA ? I have Tried all the Test from uDebug & in this forum.... Please Help me out ... i am waiting .

Code: Select all

``Got Accepted. Just a little problem on Input taking System.``
Fri Aug 07, 2015 9:20 pm
Forum: Volume 115 (11500-11599)
Topic: 11503 - Virtual Friends
Replies: 49
Views: 17271

Re: 11503 - Virtual Friends

Hi I have solved 11503 ...
Here is my Code : http://ideone.com/34YqH9
But I need to optimize this Code .. I got AC with 2.281sec. But I want to get AC within 1 sec.
Although Time Limit : 10 sec...
How to optimize it ?

Mon Jul 27, 2015 1:18 am
Forum: Volume 8 (800-899)
Topic: 884 - Factorial Factors
Replies: 49
Views: 26463

Re: 884 - Factorial Factors

Hi .....Anyone Please Help me .... I Got AC with a run time of 1.216 second ... But I want to get AC < 1 second ... How to design my Code or Optimize much my Algorithm ......... My Process : 1. Bitwise Sieve Prime generation through 1000 2. Then Precalculate all the Result using factorization. 3. Th...
Wed Jul 01, 2015 9:11 pm
Forum: Volume 114 (11400-11499)
Topic: 11489 - Integer Game
Replies: 9
Views: 3794

Re: 11489 - Integer Game

Why It is Getting WA?? I have Checked All The Tests of Samples , uDebug and OJ Borads . All are Ok . But I am getting WA . Here is my Code: - #include<bits/stdc++.h> using namespace std; int main() { int t, caseno=0; char a[1005]; scanf("%d",&t); getchar(); for(int k=0; k<t; k++) { gets(a); int dig...
Sun Jun 21, 2015 4:37 am
Forum: Volume 109 (10900-10999)
Topic: 10946 - You want what filled?
Replies: 38
Views: 17859

Re: 10946 - You want what filled?

#include<bits/stdc++.h> #define pii pair<int , int> using namespace std; char graph[100][100], ch; int m, n; int fx[]={0, 0, 1, -1}; int fy[]={1, -1, 0, 0}; struct matrix{ int s; char p; }g[100]; bool cmp(matrix left, matrix right) { if(left.s==right.s) return left.p<right.p; return left.s>right.s;...
Tue Jun 09, 2015 8:42 pm
Forum: Volume 112 (11200-11299)
Topic: 11247 - Income Tax
Replies: 50
Views: 20533

Re: 11247 - Income Tax

I found a formula for this problem is

Code: Select all

``[ A = (M*100)/(100-X) ]``
which is Adjacent to the result.
But the result in the test case will come accurately after subtracting 1 from M i.e.

Code: Select all

`` [ A = ((M-1)*100)/(100-Z) ]``
Why????
Why I Have To Subtract 1 from M ?? Someone ans the reason .
Fri Jan 09, 2015 10:32 am
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 23523

Re: 543 - Goldbach's Conjecture

I Used Sieve Method In Genrating Prime . But i am Getting TLE . I got the Verdict for 5 times . i dont Know How to get rid of it . Please help me . I am in a great TROUBLE . Here Is my Code . Please help . Thanks in Advance . :( #include<cstdio> #include<cmath> #include<cstdlib> #include<iostream> l...
Mon Dec 29, 2014 10:47 am
Forum: Volume 110 (11000-11099)
Topic: 11044 - Searching for Nessy
Replies: 11
Views: 7014

Re: 11044 - Searching for Nessy

Jan wrote:Think rows and columns differently.
I don't get this . How it could be implented . can anyone please describe with an example ??
Fri Dec 19, 2014 6:34 pm
Forum: Volume 110 (11000-11099)
Topic: 11054 - Wine trading in Gergovia
Replies: 25
Views: 6577

Re: 11054 - Wine trading in Gergovia

Hey My code Works for all inputs in sample and here's ... But I am getting WA . Why ?? here is the code .. #include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main() { long long int a[100000], t, i, j, s; double cost; while(scanf("%lld",&t)==1) { if(t==0) break; for(i=1;i<=t...
Thu Dec 11, 2014 8:45 pm
Forum: Volume 119 (11900-11999)
Topic: 11991 - Easy Problem from Rujia Liu?
Replies: 32
Views: 8688

Re: 11991 - Easy Problem from Rujia Liu?

I Am Getting TLE ?? My code works for test inputs and inputs of heres . What shoukd i do ?? ho can i optimize ?? Please help . here is my code . #include<stdio.h> int main() { long long int a[100001], i, j, m, n, x, y, k, loc, count; while(scanf("%lld %lld",&m,&n)==2) { for(i=1;i<=m;i++) scanf("%lld...
Tue Dec 09, 2014 5:22 am
Forum: Volume 116 (11600-11699)
Topic: 11614 - Etruscan Warriors Never Play Chess
Replies: 13
Views: 4425

Re: 11614 - Etruscan Warriors Never Play Chess

brianfry713 wrote:You can solve each test case in constant time.
I dont get your words .