Submission #890809

# Submission time Handle Problem Language Result Execution time Memory
890809 2023-12-22T03:42:00 Z Muhammad_Aneeq Pairs (IOI07_pairs) C++17
29 / 100
4000 ms 2396 KB
/*
بسم الله الرحمن الرحيم
Author:
                          (:Muhammad Aneeq:)
*/
#include <iostream>
using namespace std;
inline void solve()
{
  int B,N,D,M;
  cin>>B>>N>>D>>M;
  int a[N][B];
  for (int i=0;i<N;i++)
    for (int j=0;j<B;j++)
      cin>>a[i][j];
  int ans=0;
  for (int i=0;i<N;i++)
    for (int j=i+1;j<N;j++)
    {
      int z=0;
      for (int k=0;k<B;k++)
        z+=abs(a[i][k]-a[j][k]);
      ans+=(z<=D);
    }
  cout<<ans<<endl;
}
int main()
{
  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
        solve();
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 356 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 4032 ms 1116 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4025 ms 1628 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4054 ms 1628 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 4027 ms 1628 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4035 ms 1884 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4035 ms 2140 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 4065 ms 2140 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4057 ms 2396 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4064 ms 2396 KB Time limit exceeded
2 Halted 0 ms 0 KB -