Codeforces Round #552 (Div. 3) C

Codeforces Round #552 (Div. 3) C_第1张图片
暴力求解

#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;

typedef long long ll;
const int N=1e6+10;
const int INF=1000000007;
const double eps=0.0000001;
int a[N];
int b[14]={0,1,2,0,2,1,0,0,1,2,0,2,1,0};

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int x,y,z,day=0,sum=0;
    cin>>x>>y>>z;
    int ans=min(x/3,min(y/2,z/2));
    x-=ans*3;
    y-=ans*2;
    z-=ans*2;
    for(int i=0;i<7;i++)
    {
        a[0]=x,a[1]=y,a[2]=z;
        day=0;
        for(int j=i;j

你可能感兴趣的:(Codeforces,思维题型/数论相关)