Search found 12 matches

by Faithkeeper_Rangwan
Fri Jul 11, 2014 4:17 pm
Forum: Volume 119 (11900-11999)
Topic: 11960 - Divisor Game
Replies: 19
Views: 9762

Re: 11960 Divisor Game Getting WA!!

I don't think this problem even need to use prime factorization.
by Faithkeeper_Rangwan
Sun Jun 15, 2014 2:02 pm
Forum: Volume 119 (11900-11999)
Topic: 11995 - I Can Guess the Data Structure!
Replies: 60
Views: 19463

Re: 11995 - I Can Guess the Data Structure!

brianfry713 wrote:I solved this by simulating a standard int queue, priority_queue, and stack. Why are you using deques and vectors instead?
I used vector for queue since I could use it for comparison without popping it out one by one first.
by Faithkeeper_Rangwan
Sun Jun 15, 2014 1:56 pm
Forum: Volume 116 (11600-11699)
Topic: 11608 - No Problem
Replies: 25
Views: 15022

Re: 11608 - No Problem

I got WA testing all the test cases mentioned. Is there anything left out in this code?

#include<cstdio>
int problem[12];
int use[12];
int main()
{
int ready;
int count = 1;
problem[12] = 0;
scanf("%d",&ready);
while(ready>0)
{
for(int i = 0; i<12; i++) scanf("%d",&problem[i]);
for(int i ...
by Faithkeeper_Rangwan
Thu Jun 12, 2014 6:14 pm
Forum: Volume 119 (11900-11999)
Topic: 11995 - I Can Guess the Data Structure!
Replies: 60
Views: 19463

Re: 11995 - I Can Guess the Data Structure!

Got RTE, don't know where it came from.

Code: Select all

Code removed after AC
by Faithkeeper_Rangwan
Tue Jun 10, 2014 4:29 pm
Forum: Volume 127 (12700-12799)
Topic: 12700 - Banglawash
Replies: 12
Views: 3596

Re: 12700 - Banglawash

The sample output in the UVA page is quite misleading, make sure that you put newline '\n' on each test case. I screwed up quite a few times before getting AC. (I hope judge should REALLY fix this.)
by Faithkeeper_Rangwan
Thu May 22, 2014 6:54 am
Forum: Volume 103 (10300-10399)
Topic: 10324 - Zeros and Ones
Replies: 179
Views: 67637

Re: 10324 - Zeros and Ones

I got TLE with this one

Code: Select all

[color=#40FF80]AC'd[/color]
does it is because the algorithm is too slow or the improper input handling (and the program stuck in the loop)?
by Faithkeeper_Rangwan
Sat Aug 10, 2013 12:39 pm
Forum: Volume 113 (11300-11399)
Topic: 11352 - Crazy King
Replies: 32
Views: 17743

Re: 11352 - Crazy King

The whole thing seems correct, but still got WA

#include <iostream>
#include <queue>
#include <cstring>
#include <string>
long mp[100][100];
std::pair<int,int> horseMove[8] = {std::make_pair(1,2),std::make_pair(2,1),std::make_pair(-1,2),std::make_pair(-2,1),std::make_pair(1,-2),std::make_pair(2,-1 ...
by Faithkeeper_Rangwan
Thu Aug 01, 2013 3:47 pm
Forum: Volume 9 (900-999)
Topic: 929 - Number Maze
Replies: 92
Views: 55739

Re: 929 - Number Maze

Zerch wrote:is there a problem with this excersice? 929 - Number Maze ... I only get submition error... plz... help me
Very likely, I saw more than 50 recent submissions (including mine) got (consecutively) SEs.
by Faithkeeper_Rangwan
Wed Jul 31, 2013 1:52 pm
Forum: Volume 106 (10600-10699)
Topic: 10653 - Bombs! NO they are Mines!!
Replies: 36
Views: 24511

Re: 10653 - Bombs! NO they are Mines!!

I tried many different inputs, but still WA

#include <cstring>
#include <queue>
#include <utility>
#include <iostream>
#include <sstream>
#include <string>

int mp[1000][1000];
int main()
{
int c,r,b;

int bomr,bomc;

int startr,startc;
int endr,endc;


std::cin>>r>>c;
while(r|c)
{
memset ...
by Faithkeeper_Rangwan
Tue Jul 16, 2013 8:21 pm
Forum: Volume 115 (11500-11599)
Topic: 11572 - Unique Snowflakes
Replies: 36
Views: 20213

Re: 11572 - Unique Snowflakes

Here is my wrong code


#include <iostream>
#include <map>
int main()
{
int tc,tsc,s,ps,mxsize,cursize;
std::cin>>tc;
while(tc--)
{
mxsize = cursize = 0;
std::map<int,int> snf;
std::map<int,int>::iterator it;
std::cin>>tsc;
while(tsc>0)
{
std::cin>>s;
it = snf.find(s);
if(it == snf ...
by Faithkeeper_Rangwan
Thu Jul 11, 2013 4:40 pm
Forum: Volume 109 (10900-10999)
Topic: 10929 - You can say 11
Replies: 69
Views: 37558

Re: 10929 - You can say 11

brianfry713 wrote:input:

Code: Select all

01
0
output should be

Code: Select all

01 is not a multiple of 11.
AC'd

Thanks.
by Faithkeeper_Rangwan
Sun Jul 07, 2013 7:40 pm
Forum: Volume 109 (10900-10999)
Topic: 10929 - You can say 11
Replies: 69
Views: 37558

Re: 10929 - You can say 11

import java.util.*;
import java.math.*;
class Main
{
public static void main(String[] args)
{
BigInteger a,b;
Scanner sc = new Scanner(System.in);
a = sc.nextBigInteger();
while(!a.equals(BigInteger.ZERO))
{
b =a.mod(BigInteger.valueOf(11));
if(b.equals(BigInteger.ZERO)) System.out ...

Go to advanced search