#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define F first
#define S second
#define int long long
#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define vc vector
#define L cout<<'\n';
#define E cerr<<'\n';
#define all(x) x.begin(),x.end()
#define rep(i,a,b) for (int i=a; i<b; ++i)
#define rev(i,a,b) for (int i=a-1; i>=b; --i)
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define setpr(x) cout<<setprecision(x)<<fixed
#define sz size()
#define seea(a,x,y) for(int i=x;i<y;i++){cin>>a[i];}
#define seev(v,n) for(int i=0;i<n;i++){int x; cin>>x; v.push_back(x);}
#define sees(s,n) for(int i=0;i<n;i++){int x; cin>>x; s.insert(x);}
const ll inf = INT_MAX;
const ld ep = 0.0000001;
const ld pi = acos(-1.0);
const ll mod = 1000000007;
int dp[1001][1001];
bool rem(ll a , ll b){return a%b;}
void init_code(){
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
ll add(ll x, ll y){
return (x+y)%mod;
}
ll multi(ll x , ll y){
return (x*y)%mod;
}
ll power(ll x , ll y){
x %= mod;
ll res = 1;
while(y > 0){
if(y&1)res=multi(res,x);
y=y>>1;
x = multi(x,x);
}
return res;
}
ll inverse(ll n,ll p){
return power(n,p-2);
}
int helper(unordered_map<int,vector<int>>&mp, vi &v,int ind,int prev){
if(ind==v.size()) return 1;
// cout<<ans
if(dp[ind][prev]!=-1) return dp[ind][prev];
int ans=0;
for(auto it:mp[v[ind]]){
if(it>prev)ans+=helper(mp,v,ind+1,it);
ans%=mod;
}
return dp[ind][prev]=ans;
}
void solve(){
int n;
cin>>n;
vi v(n);
rep(i,0,n) cin>>v[i];
unordered_map<int,vector<int>>mp;
for(int i=1;i<=1000;i++){
string s=to_string(i);
int val=0;
for(auto it:s){
val+=it-'0';
}
mp[val].pb(i);
}
// vector<vector<int>>dp(1001,vector<int>(1001,-1));
memset(dp,-1,sizeof(dp));
cout<<helper(mp,v,0,0)<<endl;
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
init_code();
int t;cin >> t;while(t--)
solve();
return 0;
}
Finding Arrays
Google โ
๐2๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
~ Machine Learning Engineer Internship at Paisabazaar.com ~
Stipend per month :โน 25K - 30K
Batch : 2023 / 2024 / 2025
Apply : https://tinyurl.com/2nf6jsru
Stipend per month :โน 25K - 30K
Batch : 2023 / 2024 / 2025
Apply : https://tinyurl.com/2nf6jsru
The Best sequence โ
๐3๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: BarRaiser
Role: Backend Intern
Batch eligible: 2024 and 2025 grads
Apply: https://www.linkedin.com/jobs/view/3723097847
P.S: Only apply if you have at least 2 prior internship or you are from Tier 1 college.
Role: Backend Intern
Batch eligible: 2024 and 2025 grads
Apply: https://www.linkedin.com/jobs/view/3723097847
P.S: Only apply if you have at least 2 prior internship or you are from Tier 1 college.
Linkedin
BarRaiser hiring Internship-Backend in India | LinkedIn
Posted 12:56:26 PM. We are offering a 6-month internship opportunity for a Backend Intern with experience in JavaโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Swiggy
Role: Analytics Intern
Batch eligible: 2022 and 2023 grads
Apply: https://docs.google.com/forms/d/e/1FAIpQLSeDCe2Tm24DNQeRIinjYdnmBHdZB1xVIGxnXM_dJI4AmcqR3g/viewform
Role: Analytics Intern
Batch eligible: 2022 and 2023 grads
Apply: https://docs.google.com/forms/d/e/1FAIpQLSeDCe2Tm24DNQeRIinjYdnmBHdZB1xVIGxnXM_dJI4AmcqR3g/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Placewit
Role: DSA Mentor - Part time
Batch eligible: 2024 and earlier grads
Apply: https://docs.google.com/forms/d/e/1FAIpQLSf_JHdD5nCATvhV48CCY0wGAw6yilBJfJqQEyqR1eLbegZ7mA/viewform
Role: DSA Mentor - Part time
Batch eligible: 2024 and earlier grads
Apply: https://docs.google.com/forms/d/e/1FAIpQLSf_JHdD5nCATvhV48CCY0wGAw6yilBJfJqQEyqR1eLbegZ7mA/viewform
Google Docs
Placewit - Mentor - Application Form
Hi, Placewit is hiring for the Mentor positions
Placewit is an ed-tech startup which aims at helping students crack technical rounds and interviews at a high success rate, through an organized schedule of classes, webinars, and workshops.
We have a 100%โฆ
Placewit is an ed-tech startup which aims at helping students crack technical rounds and interviews at a high success rate, through an organized schedule of classes, webinars, and workshops.
We have a 100%โฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: GE Healthcare
Role: Intern
Batch eligible: 2023 and 2024 grads
Apply: https://jobs.gecareers.com/healthcare/global/en/job/R3733699/Intern
Role: Intern
Batch eligible: 2023 and 2024 grads
Apply: https://jobs.gecareers.com/healthcare/global/en/job/R3733699/Intern
GE HealthCare
Careers at GE HealthCare | GE HealthCare jobs
home
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Sign Up | LinkedIn
500 million+ members | Manage your professional identity. Build and engage with your professional network. Access knowledge, insights and opportunities.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Kutumb Hiring For Frontend Intern
Batch: 2024 / 2025
Location: Bengaluru
Apply here - https://www.linkedin.com/posts/manish-kumar-singh-51ba7260_kutumb-your-community-app-activity-7107234836251082753-Ucae
Batch: 2024 / 2025
Location: Bengaluru
Apply here - https://www.linkedin.com/posts/manish-kumar-singh-51ba7260_kutumb-your-community-app-activity-7107234836251082753-Ucae
Linkedin
Manish Kumar Singh on LinkedIn: Kutumb - Your Community App | 55 comments
Kutumbapp.com is hiring!!
Profile: Frontend Intern
Location: HSR Layout Bangalore
If you think you are the right fit for this job role, please share yourโฆ | 55 comments on LinkedIn
Profile: Frontend Intern
Location: HSR Layout Bangalore
If you think you are the right fit for this job role, please share yourโฆ | 55 comments on LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company name: Powerplay
Role: Full stack engineer intern
Location: Bengaluru
Apply: https://www.linkedin.com/jobs/view/3724903269
Role: Full stack engineer intern
Location: Bengaluru
Apply: https://www.linkedin.com/jobs/view/3724903269
Linkedin
Powerplay hiring Full Stack Engineer Intern in Bengaluru, Karnataka, India | LinkedIn
Posted 11:29:11 AM. About us
We are Powerplay, Indiaโs 1st mobile app for construction. In simple words, itโs theโฆSee this and similar jobs on LinkedIn.
We are Powerplay, Indiaโs 1st mobile app for construction. In simple words, itโs theโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
BOLD Hiring Alert! ๐จ
Role: Software Engineer - UI
Salary Range: 8-15 LPA
Location: Noida
Experience: Freshers (0-2 Years)
Skills: JavaScript, HTML/CSS, React.js
https://www.bold.com/job-description/software-engineer-ui/
Role: Software Engineer - UI
Salary Range: 8-15 LPA
Location: Noida
Experience: Freshers (0-2 Years)
Skills: JavaScript, HTML/CSS, React.js
https://www.bold.com/job-description/software-engineer-ui/
BOLD
Software Engineer-UI - BOLD
APPLY GETTING PEOPLE JOBS SINCE 2005 Since 2005, weโve helped more than 10,000,000 folks from all over America (and beyond!) discover their career path, build stronger resumes, interview with confidence, and boost their chances of finding the right job inโฆ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Mitsogo Hiring Alert! ๐จ
Role: Software Engineer (Fresher Hiring)
Salary: 5 LPA - 9 LPA
Experience: Freshers (0-1 Years)
Skills: Python, Problem Solving, OOPS
Location: Chennai
Link : https://www.mitsogo.com/career/software-engineer-fresher-hiring/
Role: Software Engineer (Fresher Hiring)
Salary: 5 LPA - 9 LPA
Experience: Freshers (0-1 Years)
Skills: Python, Problem Solving, OOPS
Location: Chennai
Link : https://www.mitsogo.com/career/software-engineer-fresher-hiring/