Submission #890848

# Submission time Handle Problem Language Result Execution time Memory
890848 2023-12-22T04:13:35 Z Muhammad_Aneeq Pairs (IOI07_pairs) C++17
29 / 100
4000 ms 2652 KB
/*
بسم الله الرحمن الرحيم
Author:
                          (:Muhammad Aneeq:)
*/
#include <iostream>
using namespace std;
#define int long long
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;
}
signed 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 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 4043 ms 1116 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4083 ms 1116 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4046 ms 1116 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 2 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 4048 ms 2136 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4040 ms 1884 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4019 ms 1880 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 2 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 4030 ms 2648 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4037 ms 2652 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 4090 ms 2648 KB Time limit exceeded
2 Halted 0 ms 0 KB -