Can anyone tell what I am wrong..i cannot find any case to bug my code.....Here is my code.. #include <iostream> #include <string> #include <map> #include <queue> #include <stack> #include <algorithm> #include <list> #include <set> #include <cmath> #include <cstring> #include <stdio.h> #include <str...
Hi unaisah .. you have a simple mistake... A sort function require....According ur code..... a[0]=t; for(li=1;li<n;li++) { a[li]=(k*a[li-1]+c)%1000007; y+=a[li]; } sort(&a[0],&a[n]); xx=sum(a,n); printf("Case %d: %lld\n",j,xx); In Sum funtion: for(i=0;i<nn;i++) { } return sum I hope u will get Accep...
please thinking easy....its a simple problem....
just think when a grid's in every column number is unique? Hints: u can count the unique number occurence...
Hi suraya... For ur input my accepted output is given... Case 1: Square Case 2: Rectangle Case 3: Rhombus Case 4: Parallelogram Case 5: Trapezium Case 6: Ordinary Quadrilateral Case 7: Ordinary Quadrilateral Case 8: Ordinary Quadrilateral Case 9: Trapezium Case 10: Parallelogram Case 11: Trapezium C...
Hi.. Surya.. Actually i don't see ur code..but from ur explanation i think something is wrong.. you can forward below this approach.. 1.if 4 arm length is equal if 4 angle is 90 --> square else ---> Rhombus 2. if (2 * 2)opposite arm length is equal if 4 angle is 90 --->Rectangle else---->Parallelogr...
Hi Kalochita...
Please be careful of problem statement ....you have in simple mistake..
1. change: case->Case
2.if(j!=T) //no need
always print a new line .
I hope u will get Accepted..
ASU(SUST)
Hi SS....
you have a simple mistake..The problem says print a blank line between test case but not at all..your program print always a blank line.
try this case:
2
1
<space><space>
1
<space><space>i am a student.
output:
Case 1:
<space>
Case 2:
<space>i am a student.
ASU(SUST)
Hi Naj..
This problem actually based on Dearagement theorem...so u have to little study in this topics..
I think u know , the number of n things are arrange in n! if the n things are not arrange in their own position what have you done? .....
ASU(SUST)
Imti ur code is right, but ur fac() funtion has too much complexity. so change this method. and try prime factor efficiently.
use sqrt(N) for prime factor. I hope u will get Accepted...
ASU(SUST)