P5742 #1 WA #2 WA #3 WA #4 WA #5 WA WA Code:
#include <iostream>
#include <cstdio>
#include <string>
#include <istream>
#include <cstdlib>
#include <iomanip>
#include <string_view>
#include <cstring>
#include <random>
#include <bits/basic_string.h>
#include <ext/atomicity.h>
#include <initializer_list>
#include <ext/alloc_traits.h>
#include <vector>
#include <regex>
#include <list>
#include <stack>
#include <ratio>
#include <map>
#include <ios>
#include <ctime>
#include <cmath>
#include <fstream>
#include <cctype>
#include <algorithm>
using namespace std;
#define PI 3.1416
#define eps 1e-5
typedef unsigned long long ULL;
typedef long long LL;
typedef unsigned int U;
typedef unsigned short UST;
typedef unsigned char UC;
struct student
{
int id, study, extend, allabove;
int sum()
{
return study + extend;
}
};
int ge_wei(ULL x)
{
return x % 10;
}
int sh_wei(ULL x)
{
return x % 100 - ge_wei(x);
}
int bai_wei(ULL x)
{
return x % 1000 - sh_wei(x) - ge_wei(x);
}
bool is_excellent(student stu)
{
return (stu.allabove >= 800 ? true : false);
}
int main(int argc, char** argv)
{
ios::sync_with_stdio(false);
cin.sync_with_stdio(false);
cout.sync_with_stdio(false);
int n;
cin >> n;
vector<student> a(n);
for(int i = 0; i < n; i++)
{
cin >> a[i].id >> a[i].study >> a[i].extend;
a[i].allabove = a[i].study * 7 + a[i].extend * 3;
}
for(int i = 0; i < n; i++)
{
if(is_excellent(a[i]))
{
cout << "Excellent" << (i + 1 == n ? '\0': '\n');
}
else
{
cout << "Not excellent" << (i + 1 == n ? '\0': '\n');
}
}
return 0;
}
Who can help me?