답안 #340395

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
340395 2020-12-27T13:48:35 Z Hazem Konstrukcija (COCI20_konstrukcija) C++14
15 / 110
4 ms 3820 KB
/*
ID: tmhazem1
LANG: C++14
TASK: pprime
*/

#include <bits/stdc++.h>
using namespace std;

#define S second
#define F first
#define LL long long

const int N = 2e5 + 10;


LL LINF = 100000000000000000;
LL INF = 1000000000;
int MOD = 1e9+7;

string s[55][2000];
LL ans[55][2000];
map<string,LL>mp;

LL add(LL a,LL b){
    return (a+b)%MOD;
}

string sub(string s,int l,int r){

    string ret = "";
    for(int i=l;i<=r;i++)
        ret += s[i];
    
    return ret;
}

bool check(string s,string r){

    bool q = 0;
    for(int i=0;i<2;i++)
        q |= sub(r,i,i+s.size()-1)==s;
    
    return q;
}

int main()
{
    //freopen("out.txt","w",stdout);
    LL k;
    scanf("%lld",&k);

    printf("%d %d\n",k+3,(k+1)*2);
    for(int i=1;i<=(k+1);i++)
        printf("%d %d\n",1,i+1);

    for(int i=1;i<=k+1;i++)
        printf("%d %d\n",i+1,k+3);
}       

Compilation message

konstrukcija.cpp: In function 'int main()':
konstrukcija.cpp:53:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   53 |     printf("%d %d\n",k+3,(k+1)*2);
      |             ~^       ~~~
      |              |        |
      |              int      long long int
      |             %lld
konstrukcija.cpp:53:17: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   53 |     printf("%d %d\n",k+3,(k+1)*2);
      |                ~^        ~~~~~~~
      |                 |             |
      |                 int           long long int
      |                %lld
konstrukcija.cpp:58:21: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   58 |         printf("%d %d\n",i+1,k+3);
      |                    ~^        ~~~
      |                     |         |
      |                     int       long long int
      |                    %lld
konstrukcija.cpp:51:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   51 |     scanf("%lld",&k);
      |     ~~~~~^~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 3820 KB Correct.
2 Correct 3 ms 3820 KB Correct.
3 Correct 4 ms 3820 KB Correct.
4 Correct 3 ms 3820 KB Correct.
5 Correct 3 ms 3820 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 3820 KB Integer parameter [name=N] equals to -33, violates the range [1, 1000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 3820 KB Correct.
2 Correct 3 ms 3820 KB Correct.
3 Correct 4 ms 3820 KB Correct.
4 Correct 3 ms 3820 KB Correct.
5 Correct 3 ms 3820 KB Correct.
6 Incorrect 3 ms 3820 KB Integer parameter [name=N] equals to -33, violates the range [1, 1000]
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 3820 KB Correct.
2 Correct 3 ms 3820 KB Correct.
3 Correct 4 ms 3820 KB Correct.
4 Correct 3 ms 3820 KB Correct.
5 Correct 3 ms 3820 KB Correct.
6 Incorrect 3 ms 3820 KB Integer parameter [name=N] equals to -33, violates the range [1, 1000]
7 Halted 0 ms 0 KB -