Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-4) was last changed on 20-Aug-2015 17:35 by bedzo

This page was created on 20-Aug-2015 17:35 by FREEZX

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 2 added one line
!!Коцки:
At line 4 added 54 lines
!C++
%%prettify
{{{
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int m,n,b;
cin>>m>>n;
b=min(m,n);
if(b%2!=0) b--;
cout<<b*b;
return 0;
}
}}}
/%
!!Озборување:
!C++
%%prettify
{{{
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
using namespace std;
int main()
{
int m,n,i,j,a,b,max=0,cur;
bool mat[101][101];
memset(mat,false,sizeof(mat));
cin>>m>>n;
for(i=1;i<=m;i++) mat[i][i]=true;
for(i=0;i<n;i++){
cin>>a>>b;
for(j=1;j<=m;j++) if(mat[j][a] || mat[j][b]) mat[j][a]=mat[j][b]=true;
}
for(i=1;i<=m;i++){
cur=0;
for(j=1;j<=m;j++) if(mat[j][i]) cur++;
if(cur>max) max=cur;
}
cout<<max-1;
return 0;
}
}}}
/%
-- Филип Беџовски
At line 376 added one line
Version Date Modified Size Author Changes ... Change note
4 20-Aug-2015 17:35 6.626 kB bedzo to previous
3 20-Aug-2015 17:35 5.787 kB bedzo to previous | to last
2 20-Aug-2015 17:35 4.378 kB FREEZX to previous | to last
1 20-Aug-2015 17:35 4.354 kB FREEZX to last
« This page (revision-4) was last changed on 20-Aug-2015 17:35 by bedzo