Search found 1 match

by tobacco5648
Fri Apr 08, 2011 5:31 pm
Forum: Volume 110 (11000-11099)
Topic: 11026 - A Grouping Problem
Replies: 28
Views: 23879

Re: 11026 - A Grouping Problem

This is my code,firstly I used int,I got WA,then changed to long long and got AC
#include<iostream>
#define maxn 1001
using namespace std;
long long p[maxn][maxn];
int main()
{
long long n,m,num[maxn];
while(cin>>n>>m&&(n!=0||m!=0))
{
long long i,j,max=-1;
for(i=1;i<=n;i++)
{
cin>>num ;
num ...

Go to advanced search