Search found 11 matches

by mohdali231993
Sat Jul 11, 2015 3:18 pm
Forum: Volume 110 (11000-11099)
Topic: 11078 - Open Credit System
Replies: 12
Views: 6016

Re: 11078 - Open Credit System

Got it.
condition should be
i > 0
by mohdali231993
Sat Jul 11, 2015 2:35 pm
Forum: Volume 110 (11000-11099)
Topic: 11078 - Open Credit System
Replies: 12
Views: 6016

Re: 11078 - Open Credit System

#include <iostream> #include <vector> using namespace std; int main() { int t,h,l,i,d,de,v; cin >> t; while(t--) { cin >> i;de = i; h = -150000;l = 150000;d = -299998; while(i--) { //cout<<i<<endl; cin >> v; if(v > h && i >= 0){ h=v;l = 150000;//cout<<" h "<<h<<endl; } else if(v < l){ l=v;//cout<<"...
by mohdali231993
Tue Dec 23, 2014 1:47 pm
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 35141

Re: 727 - Equation

Accepted
thanks man!! :D :D
by mohdali231993
Sun Dec 21, 2014 10:37 pm
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 35141

Re: 727 - Equation

#include <iostream> #include <string> #include <stack> #include <cstdio> using namespace std; typedef unsigned int uint; int main() { uint t; cin>>t; int array[127] = { }; array[40]=1; array[41]=1; array[43]=2; array[45]=2; array[42]=3; array[47]=3; char c; uint tt=t; while(t) { string s,cc;stack<c...
by mohdali231993
Sun Dec 21, 2014 11:40 am
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 46431

Re: 673 - Parentheses Balance

@lighted
Thanks i figured it out
and sorry to have bothered you
by mohdali231993
Sat Dec 20, 2014 11:53 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 46431

Re: 673 - Parentheses Balance

#include<iostream> #include<stack> #include<string> using namespace std; typedef unsigned int uint; int main() { uint t, flag = 1, len,i; char c, cc; cin>>t; while(t) { flag=1;stack<char> s;string ss;i=0; cin>>ss; len = ss.length(); while(i < len) { c = ss[i]; if((int)c == 40 || (int)c == 91) {s.pu...
by mohdali231993
Sat Dec 20, 2014 10:29 pm
Forum: Volume 6 (600-699)
Topic: 673 - Parentheses Balance
Replies: 243
Views: 46431

Re: 673 - Parentheses Balance

#include<iostream> #include<stack> #include<string> using namespace std; typedef unsigned int uint; int main() { uint t, flag = 1, len,i; char c, cc; string ss; cin>>t; while(t) { flag=1;stack<char> s;i=0; cin>>ss; len = ss.length(); while(i < len) { c = ss[i]; if((int)c == 40 || (int)c == 91) {s.p...
by mohdali231993
Mon Dec 15, 2014 8:16 pm
Forum: Volume 103 (10300-10399)
Topic: 10315 - Poker Hands
Replies: 63
Views: 27528

Re: 10315 - Poker Hands

help me out guys
i've checked all samples but still wrong answer from the judge
by mohdali231993
Mon Dec 15, 2014 8:15 pm
Forum: Volume 103 (10300-10399)
Topic: 10315 - Poker Hands
Replies: 63
Views: 27528

Re: 10315 - Poker Hands

#include<iostream> typedef unsigned int uint; using namespace std; int main() { uint scount=0,s=0; uint i=0,maxa=0,maxb=0; char c;uint cc=0; while(cin>>c) { scount=0;cc=0;maxa=0;maxb=0;s=0;i=0; uint value [100]={ },vvalue [100]={ }, a [15]={ }, b [15]={ }; while(true) { scount++; if(scount<=10)valu...
by mohdali231993
Sun Nov 09, 2014 8:58 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 68198

Re: 10189 - Minesweeper

Thanks man :D
But why exactly 110??
by mohdali231993
Sun Nov 09, 2014 6:56 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 68198

Re: 10189 - Minesweeper

#include <iostream> using namespace std; int main() { int a,b,i,j,count=0;int arr[101][101];char carr[101][101]; while(1) {cin>>a>>b; if(!a && !b) break; count++;if(count>1){cout<<endl;} for(i=1;i<=a;i++) { for(j=1;j<=b;j++) { char c; cin>>c; carr[i][j]=c; if(c==42) { arr[i-1][j-1]++; arr[i][j-1]++...

Go to advanced search