暑假集训cf50练之19

Codeforces Round #388 (Div. 2)

A水,总是忘记输出个数

#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<cstdio>
#include<cassert>
#include<iomanip>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
#define C 0.5772156649
#define pi acos(-1.0)
#define ll long long
#define mod 1000000007
#define ls l,m,rt<<1
#define rs m+1,r,rt<<1|1
#pragma comment(linker, "/STACK:1024000000,1024000000")

using namespace std;

const double g=10.0,eps=1e-7;
const int N=35000+10,maxn=500+100,inf=0x3f3f3f;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    vector<int>v;
    if(n&1)
    {
        v.push_back(3);
        n-=3;
    }
    while(n>0)
    {
        v.push_back(2);
        n-=2;
    }
    cout<<v.size()<<endl;
    for(int i=0;i<v.size();i++)
        cout<<v[i]<<" ";
    cout<<endl;
    return 0;
}
/********************

********************/

A

B平行四边形,一定是三个点

#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<cstdio>
#include<cassert>
#include<iomanip>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
#define C 0.5772156649
#define pi acos(-1.0)
#define ll long long
#define mod 1000000007
#define ls l,m,rt<<1
#define rs m+1,r,rt<<1|1
#pragma comment(linker, "/STACK:1024000000,1024000000")

using namespace std;

const double g=10.0,eps=1e-7;
const int N=35000+10,maxn=500+100,inf=0x3f3f3f;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int x[3],y[3];
    for(int i=0;i<3;i++)
        cin>>x[i]>>y[i];
    cout<<3<<endl;
    cout<<x[0]+x[2]-x[1]<<" "<<y[0]+y[2]-y[1]<<endl;
    cout<<x[0]-x[2]+x[1]<<" "<<y[0]-y[2]+y[1]<<endl;
    cout<<x[1]+x[2]-x[0]<<" "<<y[1]+y[2]-y[0]<<endl;
    return 0;
}
/********************

********************/

B

C两个队列维护进去的时间,判断哪个时间大,就pop那个,时间小的加到队列尾,时间+n

#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<stack>
#include<vector>
#include<cstdio>
#include<cassert>
#include<iomanip>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
#define C 0.5772156649
#define pi acos(-1.0)
#define ll long long
#define mod 1000000007
#define ls l,m,rt<<1
#define rs m+1,r,rt<<1|1
#pragma comment(linker, "/STACK:1024000000,1024000000")

using namespace std;

const double g=10.0,eps=1e-7;
const int N=35000+10,maxn=500+100,inf=0x3f3f3f;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int x[3],y[3];
    for(int i=0;i<3;i++)
        cin>>x[i]>>y[i];
    cout<<3<<endl;
    cout<<x[0]+x[2]-x[1]<<" "<<y[0]+y[2]-y[1]<<endl;
    cout<<x[0]-x[2]+x[1]<<" "<<y[0]-y[2]+y[1]<<endl;
    cout<<x[1]+x[2]-x[0]<<" "<<y[1]+y[2]-y[0]<<endl;
    return 0;
}
/********************

********************/

C

时间: 2024-12-14 10:03:14

暑假集训cf50练之19的相关文章

暑假集训cf50练之7

Codeforces Round #409 第一题很水但是wa了一发,因为没考虑K前面是K的情况 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #include<iomanip> #inclu

暑假集训cf50练之12

这是一场爆0的比赛...... 第一题wa了20发,longlong改double再改unsigned long long还是wa,最后判断的时候改成除,边界设为1e19就过了 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<ca

暑假集训cf50练之18

Codeforces Round #426 (Div. 2) A,判断向哪边旋转的,枚举过的=  =,感觉我的太复杂了,应该有更简单的方法 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #include&

暑假集训cf50练之15

CodeForces 402A 水题,模拟 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #include<iomanip> #include<cstdlib> #include&

暑假集训cf50练之8

Codeforces Round #400 最近好像总是有点不想打,专题也刷不动,还是坚持这做了一场,虽然打到一半就没打了...(反正通常都只能做出两题) 感觉自己切水题越来越熟练了,然而难题还是不会做.. A题,水,用vector存下来就行了 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #in

暑假集训cf50练之3

Codeforces Round #349 (Div. 2) 第一题直接算就行了为了追求手速忘了输出yes导致wa了一发... 第二题技巧题,直接sort,然后把最大的和其他的相减就是构成一条直线,为了满足条件就+1 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdi

暑假集训cf50练之14

Codeforces Round #425 (Div. 2) A超级水,三分钟1a #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #include<iomanip> #include<c

暑假集训cf50练之10

A水题,判断第一个,后面的全是0 #include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<vector> #include<cstdio> #include<cassert> #include<iomanip> #include<cstdlib> #include<cs

暑假集训(2)第五弹 ----- Who&#39;s in the Middle(poj2388)

G - Who's in the Middle Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Description FJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median