Search found 5 matches

by wawa
Tue Mar 19, 2013 3:35 pm
Forum: Volume 1 (100-199)
Topic: 105 - The Skyline Problem
Replies: 160
Views: 51481

Re: 105 - The Skyline Problem

THis problem has gotten me crazy. I've tried all test cases in the forum, seems to be alright. Here is my code, which the spaceFlag is just to print with no space in the end of the output.
Anybody can help me w this?


#include<iostream>
#include<stdio.h>
using namespace std;
const int MAX = 20000 ...
by wawa
Mon Apr 04, 2011 4:05 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 79502

Re: 673 - Parentheses Balance

#include <iostream>
#include <string>
using namespace std;
int main()
{
int n, stk, stack[128], check, wrong;
string str;
cin >> n;
cin.ignore (80, '\n');
for (int i = 0; i < n; i++)
{
getline(cin, str);
if (str == "")
stk = 0;
else
{
stk = 0;
wrong = 0;
for (int j = 0; j < str.size ...
by wawa
Thu Mar 31, 2011 3:07 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 60082

495 - Fibonacct Freeze ---- Compilation error..!!!

#include <iostream>
#include <string>
using namespace std;
string strAdd (string m, string n)
{
string result;
int addition;
int stack = 0;
if (m.size() >= n.size())
{
if (m.size() > n.size())
n = "0" + n;
for (int i = n.size() - 1; i >= 0; i--)
{
if (stack != 0)
{
addition = int(m[i ...
by wawa
Mon Dec 20, 2010 4:48 pm
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 27201

Re: 11479 - Is this the Easiest Problem?

#include <iostream>
using namespace std;
int main()
{
long long N, a, b, c;
cin >> N;
for (long long i = 0; i < N; i++)
{
cin >> a >> b >> c;
if ((a + b) <= c || (a + c) <= b || (b + c) <= a)
cout << "Case " << i + 1 << ": Invalid" << endl;
else if ((a == b) && (a == c))
cout << "Case ...
by wawa
Mon Dec 20, 2010 4:08 pm
Forum: Volume 100 (10000-10099)
Topic: 10041 - Vito's Family
Replies: 90
Views: 44597

Re: 10041 - Vito's Family

Hey, can someone help me listing any critical inputs for this problem..???? I 'm tired of getting WA for "Vito's Family"... X(
....thx...
#include <iostream>
using namespace std;
int main()
{
int N, R, dif, temp;
int *S;
cin >> N;
for (int i = 0; i < N; i++)
{
dif = 0;
cin >> R;
S = new int ...

Go to advanced search