16
16
#include<iostream>
using namespace std;
int main()
{
int a,c[100],d[100],h[100]={0},g[100],zd=0,t=1,x=0;
string b[100];
char f[100],e[100];
cin>>a;
for (int i=1;i<=a;i++)
{
cin>>b[i]>>c[i]>>d[i]>>e[i]>>f[i]>>g[i];
}
for (int i=1;i<=a;i++)
{
if (c[i]>80&&g[i]>=1)h[i]+=8000;
if (c[i]>85&&d[i]>80)h[i]+=4000;
if (c[i]>90)h[i]+=2000;
if (c[i]>85&&f[i]=='Y')h[i]+=1000;
if (d[i]>80&&e[i]=='Y')h[i]+=850;
x=x+h[i];
}
zd=h[1];
for (int i=1;i<=a;i++)
{
if (h[i]>zd){zd=h[i];t=i;}
}
cout<<endl<<b[t]<<endl<<h[t]<<endl<<x<<endl;
system("pause");
return 0;
}
133
133
133
#include<iostream>
using namespace std;
int main()
{
int a,b[200001]={0},c[200001]={0};
cin>>a;
for (int i=1;i<=a;i++)
{cin>>b[i];}
for (int i=1;i<=a;i++)
{c[b[i]]++;}
for (int i=1;i<=100001;i++)
{if (c[i]>0)cout<<i<<" "<<c[i]<<endl;}
system("pause");
return 0;
}
16
16
16
#include<iostream>
using namespace std;
int main()
{
int a,c[100],d[100],h[100]={0},g[100],zd=0,t=1,x=0;
string b[100];
char f[100],e[100];
cin>>a;
for (int i=1;i<=a;i++)
{
cin>>b[i]>>c[i]>>d[i]>>e[i]>>f[i]>>g[i];
}
for (int i=1;i<=a;i++)
{
if (c[i]>80&&g[i]>=1)h[i]+=8000;
if (c[i]>85&&d[i]>80)h[i]+=4000;
if (c[i]>90)h[i]+=2000;
if (c[i]>85&&f[i]=='Y')h[i]+=1000;
if (d[i]>80&&e[i]=='Y')h[i]+=850;
x=x+h[i];
}
zd=h[1];
for (int i=1;i<=a;i++)
{
if (h[i]>zd){zd=h[i];t=i;}
}
cout<<endl<<b[t]<<endl<<h[t]<<endl<<x<<endl;
system("pause");
return 0;
}
133
133
133
#include<iostream>
using namespace std;
int main()
{
int a,b[200001]={0},c[200001]={0};
cin>>a;
for (int i=1;i<=a;i++)
{cin>>b[i];}
for (int i=1;i<=a;i++)
{c[b[i]]++;}
for (int i=1;i<=100001;i++)
{if (c[i]>0)cout<<i<<" "<<c[i]<<endl;}
system("pause");
return 0;
}[/quote]
[/quote]