Submission #340395

#TimeUsernameProblemLanguageResultExecution timeMemory
340395HazemKonstrukcija (COCI20_konstrukcija)C++14
15 / 110
4 ms3820 KiB
/* 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 (stderr)

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);
      |     ~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...