哪里错了这道题问了一个多月了还是八十分。。。

P6188 [NOI Online #1 入门组] 文具订购

bird_秒切橙题 @ 2020-05-24 11:37:59

#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    if(n==0)
    {
        cout<<"0 0 0";
    }
    if(n<=2||n==5)
    {
        cout<<-1;
        return 0;
    }
    int a=n/14;
    n%=14;
    int b=a,c=a;
    if(n%3==1){
        b++;
        c+=n/3-1;
    }
    else if(n%3==2){
        b+=2;
        c+=n/3-2;
    }
    else
        c+=n/3;
    cout<<a<<" "<<b<<" "<<c;
    return 0;
}

by k3v1n070828 @ 2020-05-24 11:52:03

lz半途转换话题


by _tommysun_ @ 2020-05-24 11:52:04

@small_bird 这可是你自己说的,你不是秒切橙题吗?xswl


by _tommysun_ @ 2020-05-24 11:52:14

出尔反尔?


by bird_秒切橙题 @ 2020-05-24 11:52:25

@tommysun 可是这又不是橙题


by k3v1n070828 @ 2020-05-24 11:52:28


by _tommysun_ @ 2020-05-24 11:52:59

@small_bird 那请问哪道是橙题?


by zhy137036 @ 2020-05-24 11:53:17

RGB(243,156,17)
这不是橙色吗qwq


by _tommysun_ @ 2020-05-24 11:53:47

@small_bird 滚回去学好颜色再来bb


by donghanwen1225 @ 2020-05-24 11:53:48

我这里有std诶


by _5011_ @ 2020-05-24 11:54:04

如果你用可持久化 Self Adjusting Top Tree 写这个题的话,FZzzz 也许会帮你看看。


上一页 | 下一页