copypaste2.cpp: In function 'int main()':
copypaste2.cpp:8:17: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |  int K, M; scanf("%d%d", &K, &M);
      |            ~~~~~^~~~~~~~~~~~~~~~
copypaste2.cpp:9:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |  scanf(" %s", S);
      |  ~~~~~^~~~~~~~~~
copypaste2.cpp:10:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  int N; scanf("%d", &N);
      |         ~~~~~^~~~~~~~~~
copypaste2.cpp:11:30: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |  for(int i=0; i<N; i++) scanf("%d%d%d", &A[i], &B[i], &C[i]);
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~