Submission #447043

#TimeUsernameProblemLanguageResultExecution timeMemory
447043dz001Utrka (COCI14_utrka)C++11
80 / 80
49 ms2508 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back #define fi first #define se second #define MOD 1000000007 typedef long long ll; char ans[30]; int n; signed main(){ scanf("%d",&n); for(int i=0;i<n+n-1;++i){ char s[30]; scanf("%s",&s); for(int j=0;j<strlen(s);++j)ans[j]^=s[j]; } printf("%s",ans); #ifdef LOCAL cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << "s."; #endif }

Compilation message (stderr)

utrka.cpp: In function 'int main()':
utrka.cpp:18:23: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[30]' [-Wformat=]
   18 |   char s[30]; scanf("%s",&s);
      |                      ~^  ~~
      |                       |  |
      |                       |  char (*)[30]
      |                       char*
utrka.cpp:19:16: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
   19 |   for(int j=0;j<strlen(s);++j)ans[j]^=s[j];
      |               ~^~~~~~~~~~
utrka.cpp:16:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |  scanf("%d",&n);
      |  ~~~~~^~~~~~~~~
utrka.cpp:18:20: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |   char s[30]; scanf("%s",&s);
      |               ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...