Submission #608968

# Submission time Handle Problem Language Result Execution time Memory
608968 2022-07-27T11:30:38 Z sword060 Zamjena (COCI18_zamjena) C++17
14 / 70
3 ms 1640 KB
#include <bits/stdc++.h>
using namespace std;
int main(){
  ios::sync_with_stdio(0); cin.tie(0);
  int x;cin>>x;
  string a[x],b[x];
  for(int i=0;i<x;i++)cin>>a[i];
  for(int i=0;i<x;i++)cin>>b[i];
  for(int i=0;i<x;i++){
    bool f1=!(a[i][0]>='0'&&a[i][0]<='9');
    bool f2=!(b[i][0]>='0'&&b[i][0]<='9');
    if(f1&&f2)continue;
    else if(f1){
      if(a[i].size()>b[i].size()){cout<<"NE";return 0;}
    }else if(f2){
      if(a[i].size()<b[i].size()){cout<<"NE";return 0;}
    }else{
      if(a[i]!=b[i]){cout<<"NE";return 0;}
    }
  }
  cout<<"DA";
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 320 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 320 KB Output is correct
2 Correct 1 ms 316 KB Output is correct
3 Incorrect 0 ms 212 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 324 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 460 KB Output is correct
4 Incorrect 1 ms 460 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 980 KB Output is correct
2 Incorrect 3 ms 1640 KB Output isn't correct
3 Halted 0 ms 0 KB -