Search found 3 matches

by Najmuzzaman
Wed Jun 15, 2011 4:05 am
Forum: Volume 119 (11900-11999)
Topic: 11952 - Arithmetic
Replies: 11
Views: 4394

Re: 11952 - Arithmetic

#include <stdio.h> typedef long long ll; int convert(int n,int b) { int p=1,sum=0; while(n) { sum+=((n%10)*(p)); n/=10; p*=b; } return sum; } int high(int n) { int hig=0,a; while(n) { a=n%10; if(hig<a) hig=a; n/=10; } return hig; } int main() { int t,a,b,c,max,d,i; scanf("%d",&t); while(t--) { scan...
by Najmuzzaman
Thu Jun 09, 2011 11:14 am
Forum: Other words
Topic: How use Upper_bound() function in a structure array
Replies: 1
Views: 3809

How use Upper_bound() function in a structure array

Code: Select all

#include <stdio.h>
#include <algorithm>
using namespace std;
struct node{
    int a,b;
}arr[10];

int main()
{
    for(i=0;i<10;i++)
    {
        arr[i].a=i+10;
        arr[i].b=i+12;
    }
    int it=(int)(upper_bound(arr,arr+10,10)-arr);
    printf("the position is %d");
}
Do not work
by Najmuzzaman
Thu May 26, 2011 7:53 pm
Forum: Volume 120 (12000-12099)
Topic: 12024 - Hats
Replies: 5
Views: 3269

12024 - Hats

Have any tricky
I think it is a normal Number theory.

But i get WA

Go to advanced search