Submission #51800680


Source Code Expand

Copy
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long
#define fr(i, j, k) for (int i = j; i < k; i++)
#define fr2(i, j, k) for (int i = j - 1; i >= k; i--)
#define vp vector<pair<int, int>>
#define vi vector<int>
#define For(s) for (auto i : s)
#define pii pair<int, int>
#define mp map<int, int>
#define ld long double
#define se set<int>
#define ms multiset<int>
#define pb push_back
#define in insert
#define all(v) (v.begin(), v.end())
template <class T>
using oset = tree<T, null_type, less<T>, rb_tree_tag,
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long
#define fr(i, j, k) for (int i = j; i < k; i++)
#define fr2(i, j, k) for (int i = j - 1; i >= k; i--)
#define vp vector<pair<int, int>>
#define vi vector<int>
#define For(s) for (auto i : s)
#define pii pair<int, int>
#define mp map<int, int>
#define ld long double
#define se set<int>
#define ms multiset<int>
#define pb push_back
#define in insert
#define all(v) (v.begin(), v.end())
template <class T>
using oset = tree<T, null_type, less<T>, rb_tree_tag,
                  tree_order_statistics_node_update>;

signed main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  // ceil a/b=(a-1+b)/b do remember
  int t;
  t=1;
  while (t--)
  {
    int n,k;
    cin>>n>>k;
    int a[n];
    fr(i,0,n){
      cin>>a[i];
      if(a[i]%k){
        continue;
      }
      cout<<a[i]/k<<" ";
    }
    cout<<"\n";
  }
}

Submission Info

Submission Time
Task A - Divisible
User Fireheart
Language C++ 20 (gcc 12.2)
Score 100
Code Size 1041 Byte
Status AC
Exec Time 1 ms
Memory 3520 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 15
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 3452 KB
00_sample_02.txt AC 1 ms 3468 KB
00_sample_03.txt AC 1 ms 3460 KB
01_test_01.txt AC 1 ms 3320 KB
01_test_02.txt AC 1 ms 3460 KB
01_test_03.txt AC 1 ms 3388 KB
01_test_04.txt AC 1 ms 3520 KB
01_test_05.txt AC 1 ms 3388 KB
01_test_06.txt AC 1 ms 3384 KB
01_test_07.txt AC 1 ms 3408 KB
01_test_08.txt AC 1 ms 3352 KB
01_test_09.txt AC 1 ms 3516 KB
01_test_10.txt AC 1 ms 3460 KB
01_test_11.txt AC 1 ms 3396 KB
01_test_12.txt AC 1 ms 3388 KB


2025-03-31 (Mon)
05:11:38 +00:00