1 条题解

  • 0
    @ 2024-12-18 12:54:55
    #include <iostream>
    #include <bits/stdc++.h>
    #include <map>
    #include <iomanip>
    #include <string>
    #include <cstring>
    #include <queue>
    #include <math.h>
    #include <stdio.h>
    #include <cmath>
    #include <string.h>
    #include <algorithm>
    #include <cstdio>
    #include <time.h>
    using namespace std;
    int i = 1;
    void check (int l [5])
    {
        for (int j = 1; j <= 4; j++)
    	{
    		if (l [j] == 1)
            {
                cout << 1 << " ";
            }
            else
    	    {
    	        cout << 0 << " ";
    	    }
    	}
    }
    const int INF = 0x3f3f3f3f;
    const int N = 1e5 + 10;
    int a , l [5], b , c , d = 1;
    int main()
    {
            cin >> a;
            if (a <= 12 && a > 4)
            {
            	b++;
    		}
    		if (a % 2 == 0)
    		{
    			c++;
    		}
            if (b == 1 && c == 1)
    		{
    			l [1]++;
    			l [2]++;
    			check (l);
    		}
    		else if (b == 1 && c == 0 || b == 0 && c == 1)
    		{
    			l [2]++;
    			l [3]++;
    			check (l);
    		}
            else 
            {
            	l [4]++;
            	check (l);
    		}
    		return 0;
    }
    
    • 1

    信息

    ID
    3107
    时间
    1000ms
    内存
    256MiB
    难度
    1
    标签
    (无)
    递交数
    44
    已通过
    9
    上传者