zoukankan      html  css  js  c++  java
  • 【CF1028B】Unnatural Conditions(构造)

    题意:给定n与m,要求构造两个长度不超过2230的数字x,y使得x,y各自的数位和>=n,x+y的数位和<=n

    思路:

     1 #include<cstdio>
     2 #include<cstring>
     3 #include<string>
     4 #include<cmath>
     5 #include<iostream>
     6 #include<algorithm>
     7 #include<map>
     8 #include<set>
     9 #include<queue>
    10 #include<vector>
    11 using namespace std;
    12 typedef long long ll;
    13 typedef unsigned int uint;
    14 typedef unsigned long long ull;
    15 typedef pair<int,int> PII;
    16 typedef vector<int> VI;
    17 #define fi first
    18 #define se second 
    19 #define MP make_pair
    20 #define N   2100000 
    21 #define MOD 1000000007
    22 #define eps 1e-8 
    23 #define pi acos(-1)
    24 
    25 
    26 
    27 
    28 int read()
    29 { 
    30    int v=0,f=1;
    31    char c=getchar();
    32    while(c<48||57<c) {if(c=='-') f=-1; c=getchar();}
    33    while(48<=c&&c<=57) v=(v<<3)+v+v+c-48,c=getchar();
    34    return v*f;
    35 }
    36 
    37 void swap(int &x,int &y)
    38 {
    39     int t=x;x=y;y=t;
    40 }
    41 
    42 
    43 int main()
    44 {
    45  //   freopen("cf1028B.in","r",stdin);
    46    // freopen("cf1028B.out","w",stdout);
    47     int n,m;
    48     scanf("%d%d",&n,&m);
    49     for(int i=1;i<=2230;i++) printf("8");
    50     printf("
    ");
    51     for(int i=1;i<=2229;i++) printf("1");
    52     printf("2"); 
    53     return 0;
    54 }
  • 相关阅读:
    2019.7.17东湖大数据页面三
    2019.7.17东湖大数据页面二
    2019.7.17东湖大数据页面一
    css的使用方法和css选择器
    css定位和浮动
    form表单的理解及用法
    CSS中路径及form表单的用法
    关于新手html的认识 以及对table的基本用法
    网络编程和并发34题
    爬虫day01
  • 原文地址:https://www.cnblogs.com/myx12345/p/9844205.html
Copyright © 2011-2022 走看看