Skip to content

Commit f84f6b7

Browse files
committed
done
1 parent 77988a6 commit f84f6b7

File tree

4 files changed

+2
-60
lines changed

4 files changed

+2
-60
lines changed

CF1.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff 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
}

CF2.cpp

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff 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);
1515
using namespace std;
1616
typedef 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-
}
3517
int 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
}

input.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
2
2-
3 7
3-
24 25 27
4-
10 7
5-
51 52 53 54 55 56 57 58 59 60

output.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
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

0 commit comments

Comments
 (0)