#include using namespace atcoder; #include #define itr(x,c) for(auto x=c.begin();x!=c.end();x++) #define ritr(x,c) for(auto x=c.rbegin();x!=c.rend();x++) #define all(a) (a.begin()),(a.end()) #define rall(a) (a.rbegin()),(a.rend()) using namespace std; using ll=long long; using pll=pair; templatebool chmax(T &a, const T &b) {if(abool chmin(T &a, const T &b) {if(bistream& operator >> (istream& is, vector& v) { for(T& x:v) is >> x; return is; } templateostream& operator << (ostream& os, const vector& v) {for(int i=0;i void pt() { std::cout << "\n"; } template void pt_rest() { std::cout << "\n"; } template void pt_rest(const T& first, const A&... rest) { std::cout << " " << first; pt_rest(rest...); } template void pt(const T& first, const A&... rest) { std::cout << first; pt_rest(rest...); } templateistream& operator >> (istream& is, pair& p) { is >> p.first >> p.second; return is; } static const ll INF=1e18+7; static const ll MAX=101010; static const ll MOD=1e9+7; static const double PI=acos(-1); static const double EPS=1e-10; //static const ll MOD=998244353; using v1d=vector; using v2d=vector; using v3d=vector; using v4d=vector; int main(void) { cin.tie(nullptr); ios::sync_with_stdio(false); ll i,j,k; ll N,M,K;cin>>N>>M>>K; vector l(M),r(M); for(i=0;i>l[i]>>r[i]; v2d dp(K+1,v1d(N+1,0)); dp[0][1]=1; for(k=0;k