File tree Expand file tree Collapse file tree 4 files changed +2
-60
lines changed
Expand file tree Collapse file tree 4 files changed +2
-60
lines changed Original file line number Diff line number Diff line change @@ -23,19 +23,6 @@ int main() {
2323 ll tc;
2424 cin >> tc;
2525 while (tc--) {
26- ll n;
27- cin>>n;
28- map<ll,ll> mp;
29- for (int i=0 ;i<n;i++){
30- ll x;
31- cin>>x;
32- mp[x]++;
33- }
34- ll maxm=INT_MIN;
35- for (auto i:mp){
36- if (i.second >maxm)
37- maxm=i.second ;
38- }
39- cout<<maxm<<endl;
26+
4027 }
4128}
Original file line number Diff line number Diff line change @@ -14,24 +14,6 @@ GitHub: https://github.com/Hard-Coder05
1414#define FIO ios_base::sync_with_stdio (false );cin.tie(NULL );cout.tie(NULL );
1515using namespace std ;
1616typedef long long ll;
17- bool isDigitPresent (ll x, ll d)
18- {
19- while (x > 0 )
20- {
21- if (x % 10 == d)
22- break ;
23- x = x / 10 ;
24- }
25- return (x > 0 );
26- }
27- bool calc (ll n,ll d){
28- while (n>=0 ){
29- if (isDigitPresent (n,d))
30- return true ;
31- n-=d;
32- }
33- return false ;
34- }
3517int main () {
3618 FIO;
3719#ifndef ONLINE_JUDGE
@@ -41,15 +23,6 @@ int main() {
4123 ll tc;
4224 cin >> tc;
4325 while (tc--) {
44- ll q,d;
45- cin>>q>>d;
46- for (int i=0 ;i<q;i++){
47- ll x;
48- cin>>x;
49- if (calc (x,d))
50- cout<<" YES" <<endl;
51- else
52- cout<<" NO" <<endl;
53- }
26+
5427 }
5528}
Original file line number Diff line number Diff line change 1- 2
2- 3 7
3- 24 25 27
4- 10 7
5- 51 52 53 54 55 56 57 58 59 60
Original file line number Diff line number Diff line change 1- YES
2- NO
3- YES
4- YES
5- YES
6- NO
7- YES
8- YES
9- YES
10- YES
11- YES
12- YES
13- NO
You can’t perform that action at this time.
0 commit comments